World of Horror Wiki worldofhorrorwiki https://worldofhorror.miraheze.org/wiki/Main_Page MediaWiki 1.41.0 first-letter Media Special Talk User User talk World of Horror Wiki World of Horror Wiki talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Campaign Campaign talk Module Module talk Template:!- 10 187 481 2013-11-17T11:54:04Z wikipedia>Mr. Stradivarius 0 Changed protection level of Template:!-: [[WP:High-risk templates|Highly visible template]]: reinstate full-protection - this should never be edited ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite)) wikitext text/x-wiki |-<noinclude> {{documentation}} </noinclude> 19a1b27b5273caa6fd83a1208fb704afa9ee7c04 Template:Hatnote 10 108 289 2014-05-23T15:55:04Z wikipedia>SMcCandlish 0 tweak wikitext text/x-wiki <includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 4a1d1028d07c9056022807a96051e1c82cf2a1c7 Template:!! 10 191 489 2014-11-04T14:12:38Z wikipedia>Pigsonthewing 0 stet wikitext text/x-wiki ||<noinclude> {{documentation}} </noinclude> cfbaaca3cb3edae590f75b87fb775d1be21774a4 Template:Hlist 10 176 459 2015-07-04T15:13:14Z wikipedia>Penwhale 0 Changed protection level of Template:Hlist: [[WP:High-risk templates|Highly visible template]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9e3824c2e3c0e0dbef2f37556ac0b994987fecf9 Template:Div col end 10 46 89 2015-10-03T15:58:07Z wikipedia>NeilN 0 Changed protection level of Template:Div col end: per request at [[WP:RFPP]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{Documentation|Template:Div col/doc}} </noinclude> 78088d41c21d779e3722f220fcc9773dfbbc1e4f Template:Ordered list 10 193 493 2015-12-14T10:30:21Z wikipedia>The Earwig 0 Protected "[[Template:Ordered list]]": [[WP:High-risk templates|Highly visible template]]: thousands of mainspace transclusions; match siblings; unlikely to be edited ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template... wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|ordered}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> c74568f5fac4f743ef2e52f830e220d8cdbc3ae1 Template:Bulleted list 10 192 491 2015-12-26T16:25:12Z wikipedia>Frietjes 0 documentation does this wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|bulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 37ac60a83d34c2df10fb601002557ad1b55919bb Template:Category link 10 111 295 2016-09-21T14:41:05Z wikipedia>Anthony Appleyard 0 Anthony Appleyard moved page [[Template:Cl]] to [[Template:Category link]] over redirect: [[Special:Permalink/740508935|Requested]] by Nyuszika7H at [[WP:RM/TR]]: The template should be located at the natural, unabbreviated title and &#123;&#123;[[Temp... wikitext text/x-wiki {{#ifeq:{{#titleparts:{{PAGENAME}}|1}}|Stub types for deletion |[[:Category:{{{1}}}|Cat:{{{1}}}]] | [[:Category:{{{1}}}|{{{2|Category:{{{1}}}}}}]]{{#ifeq:{{Yesno|{{{count|no}}}}}|yes|<small> {{#ifexpr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}>={{{backlog|{{#expr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}+1}}}}}|<span style="font-weight: bold; color: #DD0000;">}}(&thinsp;{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}}}&thinsp;){{#ifexpr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}>={{{backlog|{{#expr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}+1}}}}}|</span>}}</small>}}}}<noinclude> {{Documentation}} </noinclude> cb0fcaeb8242d1d37c27a8dcb57f76fe5b5faa36 Template:Section link 10 195 499 2017-01-17T01:29:39Z wikipedia>Primefac 0 done wikitext text/x-wiki {{#invoke:Section link|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 8d047e5845f8a9b74a4655b5dd79ca7595a8f88b Template:Tlp 10 118 309 2017-01-23T13:35:17Z wikipedia>MSGJ 0 MSGJ moved page [[Template:Tlp]] to [[Template:Template link with parameters]]: expand name of template wikitext text/x-wiki #REDIRECT [[Template:Template link with parameters]] {{R from move}} 3867e4ef4fe637ce8530859b5486b23e916d0b8a Template:TOCright 10 121 315 2017-03-31T02:09:13Z wikipedia>Paine Ellsworth 0 add [[WP:RCAT|rcat]]s wikitext text/x-wiki #REDIRECT [[Template:TOC right]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} f20e461364ddb55d5f46a9e77871e34208173664 Module:Lang/ISO 639 synonyms 828 100 273 2017-12-13T23:10:47Z wikipedia>Trappist the monk 0 Scribunto text/plain -- File-Date: 2013-01-11 return { ["aar"] = "aa", ["abk"] = "ab", ["afr"] = "af", ["aka"] = "ak", ["amh"] = "am", ["ara"] = "ar", ["arg"] = "an", ["asm"] = "as", ["ava"] = "av", ["ave"] = "ae", ["aym"] = "ay", ["aze"] = "az", ["bak"] = "ba", ["bam"] = "bm", ["bel"] = "be", ["ben"] = "bn", ["bih"] = "bh", ["bis"] = "bi", ["bod"] = "bo", ["bos"] = "bs", ["bre"] = "br", ["bul"] = "bg", ["cat"] = "ca", ["ces"] = "cs", ["cha"] = "ch", ["che"] = "ce", ["chu"] = "cu", ["chv"] = "cv", ["cor"] = "kw", ["cos"] = "co", ["cre"] = "cr", ["cym"] = "cy", ["dan"] = "da", ["deu"] = "de", ["div"] = "dv", ["dzo"] = "dz", ["ell"] = "el", ["eng"] = "en", ["epo"] = "eo", ["est"] = "et", ["eus"] = "eu", ["ewe"] = "ee", ["fao"] = "fo", ["fas"] = "fa", ["fij"] = "fj", ["fin"] = "fi", ["fra"] = "fr", ["fry"] = "fy", ["ful"] = "ff", ["gla"] = "gd", ["gle"] = "ga", ["glg"] = "gl", ["glv"] = "gv", ["grn"] = "gn", ["guj"] = "gu", ["hat"] = "ht", ["hau"] = "ha", ["heb"] = "he", ["her"] = "hz", ["hin"] = "hi", ["hmo"] = "ho", ["hrv"] = "hr", ["hun"] = "hu", ["hye"] = "hy", ["ibo"] = "ig", ["ido"] = "io", ["iii"] = "ii", ["iku"] = "iu", ["ile"] = "ie", ["ina"] = "ia", ["ind"] = "id", ["ipk"] = "ik", ["isl"] = "is", ["ita"] = "it", ["jav"] = "jv", ["jpn"] = "ja", ["kal"] = "kl", ["kan"] = "kn", ["kas"] = "ks", ["kat"] = "ka", ["kau"] = "kr", ["kaz"] = "kk", ["khm"] = "km", ["kik"] = "ki", ["kin"] = "rw", ["kir"] = "ky", ["kom"] = "kv", ["kon"] = "kg", ["kor"] = "ko", ["kua"] = "kj", ["kur"] = "ku", ["lao"] = "lo", ["lat"] = "la", ["lav"] = "lv", ["lim"] = "li", ["lin"] = "ln", ["lit"] = "lt", ["ltz"] = "lb", ["lub"] = "lu", ["lug"] = "lg", ["mah"] = "mh", ["mal"] = "ml", ["mar"] = "mr", ["mkd"] = "mk", ["mlg"] = "mg", ["mlt"] = "mt", ["mon"] = "mn", ["mri"] = "mi", ["msa"] = "ms", ["mya"] = "my", ["nau"] = "na", ["nav"] = "nv", ["nbl"] = "nr", ["nde"] = "nd", ["ndo"] = "ng", ["nep"] = "ne", ["nld"] = "nl", ["nno"] = "nn", ["nob"] = "nb", ["nor"] = "no", ["nya"] = "ny", ["oci"] = "oc", ["oji"] = "oj", ["ori"] = "or", ["orm"] = "om", ["oss"] = "os", ["pan"] = "pa", ["pli"] = "pi", ["pol"] = "pl", ["por"] = "pt", ["pus"] = "ps", ["que"] = "qu", ["roh"] = "rm", ["ron"] = "ro", ["run"] = "rn", ["rus"] = "ru", ["sag"] = "sg", ["san"] = "sa", ["sin"] = "si", ["slk"] = "sk", ["slv"] = "sl", ["sme"] = "se", ["smo"] = "sm", ["sna"] = "sn", ["snd"] = "sd", ["som"] = "so", ["sot"] = "st", ["spa"] = "es", ["sqi"] = "sq", ["srd"] = "sc", ["srp"] = "sr", ["ssw"] = "ss", ["sun"] = "su", ["swa"] = "sw", ["swe"] = "sv", ["tah"] = "ty", ["tam"] = "ta", ["tat"] = "tt", ["tel"] = "te", ["tgk"] = "tg", ["tgl"] = "tl", ["tha"] = "th", ["tir"] = "ti", ["ton"] = "to", ["tsn"] = "tn", ["tso"] = "ts", ["tuk"] = "tk", ["tur"] = "tr", ["twi"] = "tw", ["uig"] = "ug", ["ukr"] = "uk", ["urd"] = "ur", ["uzb"] = "uz", ["ven"] = "ve", ["vie"] = "vi", ["vol"] = "vo", ["wln"] = "wa", ["wol"] = "wo", ["xho"] = "xh", ["yid"] = "yi", ["yor"] = "yo", ["zha"] = "za", ["zho"] = "zh", ["zul"] = "zu" } f3fb5374c9e0fdef6ce6ea22736b79468358ca19 Template:Var 10 116 305 2017-12-21T13:31:52Z wikipedia>Izno 0 nix xml lang invocation wikitext text/x-wiki <var {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-right: 1px;{{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</var><noinclude> <!--Categories and interwikis go near the bottom of the /doc page.--> {{Documentation}} </noinclude> 0e9e47694c01ca4c7b29566a1cb11a117dfbf2c0 Template:Glossary 10 209 527 2018-01-19T00:29:58Z wikipedia>Primefac 0 Protected "[[Template:Glossary]]": [[WP:SEMIPROT|semi-protection]] of high-usage templates to combat systematic vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki <dl class="glossary {{{class|}}}" {{#if:{{{style|}}}|style="{{{style}}}"|}} {{#if:{{{id|}}}|id="{{{id}}}"|}}><noinclude>{{glossary end}} <!--Categories and interwikis go on the /doc page.--> {{Documentation}} </noinclude> afaf333b451c8bb5f581afb121ef9c3c5f8b7be8 Template:Yesno-no 10 47 91 2018-02-13T20:27:17Z wikipedia>WOSlinker 0 separate pp-template not needed wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Template:TemplateDataHeader 10 124 323 2018-02-23T16:30:31Z wikipedia>Primefac 0 Changed protection level for "[[Template:TemplateDataHeader]]": [[WP:HIGHRISK|high-risk]] template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki #REDIRECT [[Template:TemplateData header]] {{R from move}} 61e461016bcb3a0a6fc4d8aea35d590298c19630 Template:Thinsp 10 89 251 2018-02-23T17:03:07Z wikipedia>Primefac 0 Changed protection level for "[[Template:Thinsp]]": [[WP:HIGHRISK|high-risk]] template with 2000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki #REDIRECT [[Template:Thin space]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} 2469064d969db6a9cf1e47e2d1ee0a5e2c9eb495 Template:Details 10 107 287 2018-02-26T07:20:44Z wikipedia>Galobtter 0 redirect to complete merge wikitext text/x-wiki #REDIRECT [[Template:Further]] {{Redirect category shell| {{R from merge}} }} 1a90a51d85f6cb700979ea38f5f69bee0ff2c85e Template:Yesno-yes 10 174 455 2018-03-11T01:06:35Z wikipedia>JJMC89 0 allow subst wikitext text/x-wiki {{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1644b79058ef2cece539a411edc164d98bb11ebe Module:Distinguish 828 28 53 2018-04-01T10:06:10Z wikipedia>Galobtter 0 fixed with text and selfref Scribunto text/plain local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local mTableTools --initialize lazily local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} function p.distinguish(frame) mArguments = require('Module:Arguments') mTableTools = require('Module:TableTools') local args = mArguments.getArgs(frame) local selfref = args.selfref local text = args.text args = mTableTools.compressSparseArray(args) return p._distinguish(args, text, selfref) end function p._distinguish(args, text, selfref) checkType("_distinguish", 1, args, 'table') if #args == 0 and not text then return '' end local text = string.format( 'Not to be confused with %s.', text or mHatlist.orList(args, true) ) hnOptions = {selfref = selfref} return mHatnote._hatnote(text, hnOptions) end return p 0364d14af01fc656ad1d898c5036fbd12a7ca938 Template:Navbox lists 10 231 573 2018-05-30T19:49:39Z wikipedia>Ahecht 0 Ahecht moved page [[Template:Navbox lists]] to [[Template:HTML lists]]: title is "HTML lists" wikitext text/x-wiki #REDIRECT [[Template:HTML lists]] {{R from move}} 8b26162bd61fb3a71c7bbf97d6b1aff6ba54020e Template:For loop 10 182 471 2018-07-23T22:55:18Z wikipedia>Pppery 0 Merge complete wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:For loop|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 12b7b7010fe32f888e21bcdfa6a904fc8a925437 Template:Tag 10 199 507 2018-07-26T17:17:13Z wikipedia>SMcCandlish 0 These are called attributes; no one who does HTML calls them "parameters". wikitext text/x-wiki <code class="{{#ifeq:{{{wrap|}}}|yes|wrap|nowrap}}" style="{{#ifeq:{{{style|}}}|plain|border:none;background:transparent;|{{{style|}}}}}"><!-- Opening tag -->{{#switch:{{{2|pair}}} |c|close = |e|empty|s|single|v|void |o|open |p|pair = &lt;{{#if:{{{link|}}}|[[HTML element#{{{1|tag}}}|{{{1|tag}}}]]|{{{1|tag}}}}}{{#if:{{{params|{{{attribs|}}}}}}|&#32;{{{params|{{{attribs}}}}}}}} }}<!-- Content between tags -->{{#switch:{{{2|pair}}} |c|close = {{{content|}}} |e|empty|s|single|v|void = &#32;&#47;&gt; |o|open = &gt;{{{content|}}} |p|pair = {{#ifeq:{{{1|tag}}}|!--||&gt;}}{{{content|...}}} }}<!-- Closing tag -->{{#switch:{{{2|pair}}} |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:{{{1|tag}}}|!--|--&gt;|&lt;&#47;{{{1|tag}}}&gt;}} }}<!-- --></code><noinclude> {{Documentation}} </noinclude> eae208bc1612c834de697fa3ee9b343966cf8602 Template:Flowlist/styles.css 10 207 523 2018-07-27T12:35:42Z wikipedia>Galobtter 0 attribution: from [[MediaWiki:Common.css]] sanitized-css text/css .flowlist ul { overflow-x: hidden; margin-left: 0; padding-left: 1.6em; } .flowlist ol { overflow-x: hidden; margin-left: 0; padding-left: 3.2em; } .flowlist dl { overflow-x: hidden; } 9e1541baa2f3cc3d7b4d7ac39f073f3a43a91c06 Template:Further 10 106 285 2018-07-27T17:29:22Z wikipedia>Galobtter 0 fix so that don't need [[Module:Further]] anymore wikitext text/x-wiki <includeonly>{{#invoke:labelled list hatnote|labelledList|Further information{{#if:{{{topic|}}}|&#32;on {{{topic|}}}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> dd29c6dfb3894a2dc3f20144a654b7012c9a9214 Template:Infobox 10 4 5 2018-08-15T18:33:36Z wikipedia>Primefac 0 Undid revision 855063393 by [[Special:Contributions/Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) rather problematic change mentioned [[Template_talk:Infobox#Using_template_styles_to_reduce_technical_debt_inside_mobile_skin|on talk page]], reverting until it can be sorted wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Template:Nobold 10 13 23 2018-10-23T17:15:13Z wikipedia>Frietjes 0 wikitext text/x-wiki <templatestyles src="Nobold/styles.css"/><span class="nobold">{{{1}}}</span><noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 9c92b5951772bb26ca0fbe9256418b65e47700dd Template:Format item 10 214 537 2018-12-07T07:48:58Z wikipedia>MusikAnimal 0 Protected "[[Template:Format item]]": [[Wikipedia:High-risk templates|High-risk template]] ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki <includeonly>{{#invoke:Item|format}}</includeonly><noinclude> {{doc}} </noinclude> 0de34fe93b7513b034123ce1c532fd0f2df896dc Template:Item 10 215 539 2018-12-07T07:48:58Z wikipedia>MusikAnimal 0 Protected "[[Template:Item]]": [[Wikipedia:High-risk templates|High-risk template]] ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki <includeonly>{{#invoke:Item|pack}}</includeonly><noinclude> {{doc}} </noinclude> 2a8d49a45be839260ad83d33fa73c804d0a39e55 Template:Template other 10 24 45 2018-12-16T22:06:25Z wikipedia>Amorymeltzer 0 Changed protection level for "[[Template:Template other]]": [[WP:High-risk templates|Highly visible template]]: Transclusion count has increased dramatically ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Module:Color contrast 828 185 477 2019-01-06T22:38:25Z wikipedia>Johnuniq 0 fix unintended color2lum global error which is causing errors; clean whitespace Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Module:Color contrast/colors 828 186 479 2019-01-24T12:30:11Z wikipedia>Galobtter 0 Changed protection level for "[[Module:Color contrast/colors]]": [[WP:High-risk templates|High-risk Lua module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Module:Item 828 218 545 2019-01-24T21:24:24Z wikipedia>MusikAnimal 0 Protected "[[Module:Item]]": [[Wikipedia:High-risk templates|High-risk module]] ([Edit=Require autoconfirmed or confirmed access] (indefinite)) Scribunto text/plain local p = {} local function escape(str) return str:gsub("[|\\]", function (c) return string.format("\\%03d", c:byte()) end) end local function unescape(str) return str:gsub("\\(%d%d%d)", function (d) return string.char(d) end) end -- Implements [[Template:Item]] function p.pack(frame) local parent = frame:getParent() local result = '' for key, value in pairs(parent.args) do result = result .. "|" .. escape(tostring(key)) .. "|" .. escape(value) end return result .. "|"; end local function unpack(str) local result = { } for key, value in str:gfind("|([^|]*)|([^|]*)") do result[unescape(key)] = unescape(value) end return result end -- Implements [[Template:Component]] function p.component(frame) return unpack(frame.args[1])[frame.args[2]] end local function getItems(frame) return frame:getParent().args end local function invert(tbl) local result = { } for key, value in pairs(tbl) do result[value] = key end return result end -- Add args into item as appropriate (see [[Template:Format item]]) local function addArgs( item, -- unpacked item to modify args, -- arguments for adding into item ignore, -- pass in invert{keys to ignore} shift -- for numbered arguments, args[key+shift] is assigned to item[key] -- returns: item ) for key, value in pairs(args) do if not ignore[key] then local _, _, paramKey = string.find(key, "^param (.*)") local _, _, importantKey = string.find(key, "^important (.*)") paramKey = paramKey or importantKey or key if shift and type(paramKey) == "number" then paramKey = paramKey - shift if paramKey < 1 then paramKey = nil end end if paramKey and (importantKey or item[paramKey] == nil) then item[paramKey] = value end end end return item end -- Implements [[Template:Format item]] function p.format(frame) local args = frame:getParent().args local ignore = invert{ "template", "item" } local templateArgs = addArgs(unpack(args.item), args, ignore) return frame:expandTemplate{ title = args.template, args = templateArgs } end -- See [[Template:Item#Format each item using a template]] function p.each(frame) local args = frame.args local items = getItems(frame) local separator = args[1] or "" local prepend = args[2] or "" local append = args[3] or "" local ignore = invert{ "template" } local shift = 3 local result = "" for i, item in ipairs(items) do local templateArgs = addArgs(unpack(item), args, ignore, shift) result = result .. prepend .. frame:expandTemplate{ title = args.template, args = templateArgs } .. append if items[i + 1] then result = result .. separator end end return result end -- See [[Template:Item#Gather given parameter from all items]] function p.gather(frame) local args = frame.args local items = getItems(frame) local parameter = args.parameter or "1" local templateArgs = { } for i, item in ipairs(items) do templateArgs[i] = unpack(item)[parameter] end return frame:expandTemplate{ title = args.template, args = templateArgs } end return p 46e61b1549d18c301bcc79ecd120a0aa790f8894 Template:Nobold/styles.css 10 14 25 2019-03-03T23:43:41Z wikipedia>Pppery 0 Adding protection template text text/plain /* {{pp-template}} */ /* Styling for Template:Nobold */ .nobold { font-weight: normal; } 83e5f0adacf8c7984251f1fd9d11ed82ebaadf03 Template:Mono/styles.css 10 173 453 2019-03-04T00:01:15Z wikipedia>Pppery 0 Adding protection template sanitized-css text/css /* {{pp-template}} */ .monospaced { /* "monospace, monospace" per [[WP:MONO]] */ font-family: monospace, monospace; } cadfc2ad2e42cde230abf3e74ad418f7c4c71ab4 Template:Lua 10 64 125 2019-03-20T22:04:45Z wikipedia>RMCD bot 0 Removing notice of move discussion wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Cl 10 112 297 2019-04-24T04:30:48Z wikipedia>JJMC89 0 actual template is in the category wikitext text/x-wiki #REDIRECT [[Template:Category link]] {{R from move}} f79fddc38797fc163b6e6ddeb4377afbea7d0cfc Template:Clc 10 122 319 2019-04-24T04:30:59Z wikipedia>JJMC89 0 actual template is in the category wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Template:Str endswith 10 91 255 2019-05-30T14:16:29Z wikipedia>MSGJ 0 use [[Module:String]] per [[Wikipedia:Templates_for_discussion/Log/2019_February_18#Module:Str_endswith|TfD]] discussion wikitext text/x-wiki {{#ifeq:{{{1|a}}}{{{2|a}}}|{{{1|b}}}{{{2|b}}}|{{#invoke:String|endswith|source={{{1}}}|pattern={{{2}}} }}|yes<!--backward compatibility -->}}<noinclude> {{documentation}} </noinclude> 13dfad2dc8c562869bc85a37524258ffebf9a62f Template:Mono 10 171 449 2019-10-13T01:15:06Z wikipedia>Izno 0 implement ifsubst wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>ifsubst|1=|2=<templatestyles src="Mono/styles.css" />}}<span class="monospaced">{{{2|{{{1}}}}}}</span><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 800f06823c02b03f8b9cf1e245ad8c4829cfe931 Template:Unbulleted list 10 177 461 2019-12-09T17:31:16Z wikipedia>Jonesey95 0 Undid revision 929522913 by [[Special:Contributions/MSGJ|MSGJ]] ([[User talk:MSGJ|talk]]). Reverted, as this change has been shown to have bugs. Discussion continues on talk page. wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|unbulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 89815a491d3e05b20af446e34cda13f13c25fb4f Module:Arguments 828 6 9 2020-04-01T06:12:40Z wikipedia>MusikAnimal 0 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Yesno 828 5 7 2020-04-01T06:27:55Z wikipedia>MusikAnimal 0 Undid revision 948472533 by [[Special:Contributions/w>Vogone|w>Vogone]] ([[User talk:w>Vogone|talk]]) Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:File link 828 31 59 2020-04-01T06:31:54Z wikipedia>MusikAnimal 0 Undid revision 948472508 by [[Special:Contributions/w>IPad365|w>IPad365]] ([[User talk:w>IPad365|talk]]) Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Template:Sandbox other 10 53 103 2020-04-03T00:08:09Z wikipedia>Evad37 0 Also match subpage names beginning with "sandbox", per [[Template_talk:Sandbox_other#Template-protected_edit_request_on_28_March_2020|edit request]] wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 91e4ae891d6b791615152c1fbc971414961ba872 Template:Tlf 10 56 109 2020-04-13T14:42:57Z wikipedia>Primefac 0 Primefac moved page [[Template:Tlf]] to [[Template:Template link with link off]]: full name to indicate what it does wikitext text/x-wiki #REDIRECT [[Template:Template link with link off]] {{Redirect category shell| {{R from move}} }} 52759e1d3f7c9aa4a03d0b7d4f84f4c6adf53edf Template:Cslist 10 200 509 2020-04-25T18:00:10Z wikipedia>MusikBot II 0 Protected "[[Template:Cslist]]": [[Wikipedia:High-risk templates|High-risk template or module]] ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki <templatestyles src="Cslist/styles.css" />{{#invoke:Cslist |makelist}}<noinclude> {{documentation}} </noinclude> 8de0ef2dc8a52f1f2d050ca747d583cd776a0b84 Module:For loop 828 183 473 2020-05-22T07:38:08Z wikipedia>Johnuniq 0 require [[Module:Template invocation]] only if required (see [[Template talk:Post-nominals#Use of Module:Template_invocation]]); clean whitespace, variables Scribunto text/plain -- This module implements {{for loop}}. local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local p = {} function p.main(frame) local args = getArgs(frame, { trim = false, removeBlanks = false }) return p._main(args) end function p._main(args) local template = args['call'] or 'void' local calltemplates = yesno(args.substall or "", true) or not mw.isSubsting() local variableParam = args.pv variableParam = tonumber(variableParam) or variableParam or 1 -- fix for positional parameters local variableValPrefix = args.prefix or '' local variableValPostfix = args.postfix or '' local sep = args[1] or '' local constantArgs = p.getConstants(args) local variableVals = p.getVariableVals(args) local result = '' local addSeparator = false; for _, v in ipairs(variableVals) do v = mw.text.trim(v) if #v > 0 or not yesno(args.skipBlanks) then if addSeparator then result = result .. sep end addSeparator = true; local targs = constantArgs targs[variableParam] = variableValPrefix .. v .. variableValPostfix if calltemplates then local output = p.callTemplate(template, targs) if #mw.text.trim(output) == 0 then addSeparator = false end result = result .. output else local makeTemplate = require('Module:Template invocation').invocation result = result .. makeTemplate(template, targs) end end end return result end function p.getConstants(args) local constantArgNums = p.getArgNums(args, 'pc', 'n') local constantArgs = {} for _, num in ipairs(constantArgNums) do local keyArg = 'pc' .. tostring(num) .. 'n' local valArg = 'pc' .. tostring(num) .. 'v' local key = args[keyArg] key = tonumber(key) or key local value = args[valArg] constantArgs[key] = value end return constantArgs end function p.getVariableVals(args) local variableVals = {} if args.start or args.stop or args.by then if args[2] then error("Both start/stop/by and numbered parameters specified") end local start = tonumber(args.start or 1) local stop = tonumber(args.stop or 1) local by = tonumber(args.by or 1) for i = start, stop, by do variableVals [#variableVals + 1] = i end else for i, v in ipairs(args) do if i ~= 1 then variableVals[i - 1] = v end end end return variableVals end function p.getArgNums(args, prefix, suffix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix and suffix. local nums = {} local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' for k, _ in pairs(args) do local num = tostring(k):match(pattern) if num then nums[#nums + 1] = tonumber(num) end end table.sort(nums) return nums end function p.callTemplate(template, targs) return mw.getCurrentFrame():expandTemplate{title = template, args = targs} end return p 4ed4682b1fd3fbf2bf0836b46dd19bc0363d40e2 Template:Sidebar 10 27 51 2020-06-04T02:43:13Z wikipedia>Primefac 0 TFD closed as keep ([[WP:XFDC|XFDcloser]]) wikitext text/x-wiki {{#invoke:Sidebar|sidebar}}<noinclude> {{documentation}}</noinclude> ab2498000a99daf324f656b0badd187b4a3e2b42 Template:Yesno 10 11 19 2020-08-28T03:15:17Z wikipedia>Xaosflux 0 add additional paramerters, "t", "f" - requested on talk - worked in sandbox /testcases wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Module:TNT 828 76 495 2020-08-30T07:28:25Z wikipedia>Johnuniq 0 Changed protection level for "[[Module:TNT]]": [[WP:High-risk templates|High-risk Lua module]]: per request at [[WP:RFPP]] to match [[Module:Excerpt]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain -- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT -- Please do not modify it anywhere else, as it may get copied and override your changes. -- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT -- -- DESCRIPTION: -- The "msg" function uses a Commons dataset to translate a message -- with a given key (e.g. source-table), plus optional arguments -- to the wiki markup in the current content language. -- Use lang=xx to set language. Example: -- -- {{#invoke:TNT | msg -- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --> -- | source-table <!-- uses a translation message with id = "source-table" --> -- | param1 }} <!-- optional parameter --> -- -- -- The "doc" function will generate the <templatedata> parameter documentation for templates. -- This way all template parameters can be stored and localized in a single Commons dataset. -- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons. -- -- {{#invoke:TNT | doc | Graph:Lines }} -- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab -- if the current page is Template:Graph:Lines/doc -- local p = {} local i18nDataset = 'I18n/Module:TNT.tab' -- Forward declaration of the local functions local sanitizeDataset, loadData, link, formatMessage function p.msg(frame) local dataset, id local params = {} local lang = nil for k, v in pairs(frame.args) do if k == 1 then dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then table.insert(params, mw.text.trim(v)) elseif k == 'lang' and v ~= '_' then lang = mw.text.trim(v) end end return formatMessage(dataset, id, params, lang) end -- Identical to p.msg() above, but used from other lua modules -- Parameters: name of dataset, message key, optional arguments -- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.format(dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('format', 1, dataset, 'string') checkType('format', 2, key, 'string') return formatMessage(dataset, key, {...}) end -- Identical to p.msg() above, but used from other lua modules with the language param -- Parameters: language code, name of dataset, message key, optional arguments -- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.formatInLanguage(lang, dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('formatInLanguage', 1, lang, 'string') checkType('formatInLanguage', 2, dataset, 'string') checkType('formatInLanguage', 3, key, 'string') return formatMessage(dataset, key, {...}, lang) end -- Obsolete function that adds a 'c:' prefix to the first param. -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' function p.link(frame) return link(frame.args[1]) end function p.doc(frame) local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1]) return frame:extensionTag('templatedata', p.getTemplateData(dataset)) .. formatMessage(i18nDataset, 'edit_doc', {link(dataset)}) end function p.getTemplateData(dataset) -- TODO: add '_' parameter once lua starts reindexing properly for "all" languages local data = loadData(dataset) local names = {} for _, field in pairs(data.schema.fields) do table.insert(names, field.name) end local params = {} local paramOrder = {} for _, row in pairs(data.data) do local newVal = {} local name = nil for pos, val in pairs(row) do local columnName = names[pos] if columnName == 'name' then name = val else newVal[columnName] = val end end if name then params[name] = newVal table.insert(paramOrder, name) end end -- Work around json encoding treating {"1":{...}} as an [{...}] params['zzz123']='' local json = mw.text.jsonEncode({ params=params, paramOrder=paramOrder, description=data.description }) json = string.gsub(json,'"zzz123":"",?', "") return json end -- Local functions sanitizeDataset = function(dataset) if not dataset then return nil end dataset = mw.text.trim(dataset) if dataset == '' then return nil elseif string.sub(dataset,-4) ~= '.tab' then return dataset .. '.tab' else return dataset end end loadData = function(dataset, lang) dataset = sanitizeDataset(dataset) if not dataset then error(formatMessage(i18nDataset, 'error_no_dataset', {})) end -- Give helpful error to thirdparties who try and copy this module. if not mw.ext or not mw.ext.data or not mw.ext.data.get then error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset) end local data = mw.ext.data.get(dataset, lang) if data == false then if dataset == i18nDataset then -- Prevent cyclical calls error('Missing Commons dataset ' .. i18nDataset) else error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)})) end end return data end -- Given a dataset name, convert it to a title with the 'commons:data:' prefix link = function(dataset) return 'c:Data:' .. mw.text.trim(dataset or '') end formatMessage = function(dataset, key, params, lang) for _, row in pairs(loadData(dataset, lang).data) do local id, msg = unpack(row) if id == key then local result = mw.message.newRawMessage(msg, unpack(params or {})) return result:plain() end end if dataset == i18nDataset then -- Prevent cyclical calls error('Invalid message key "' .. key .. '"') else error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)})) end end return p 9d0d10e54abd232c806dcabccaf03e52858634a1 Template:Abbr 10 88 249 2020-09-02T09:46:47Z wikipedia>Primefac 0 remove third parameter, as it is causing lint issues (TPER) wikitext text/x-wiki <abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}} </noinclude> 5fd53aa19ba927ce3eea9092a4fa31f881df0a6e Template:Nihongo 10 86 245 2020-09-17T17:04:00Z wikipedia>Trappist the monk 0 use [[Module:Nihongo]]; wikitext text/x-wiki <includeonly>{{#invoke:Nihongo|nihongo}}</includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis to Wikidata. --> </noinclude> d0dcc4933a65afd93128f90aa7ce4ba2c8bd20e7 Template:Cslist/styles.css 10 201 511 2020-09-18T15:41:55Z wikipedia>Izno 0 add embedded option sanitized-css text/css /* {{pp-template}} */ /* make an inline list with either comma or semicolon separators */ ul.cslist, ul.sslist { margin: 0; padding: 0; display: inline-block; list-style: none; } ul.cslist-embedded { display: inline; } .cslist li, .sslist li { margin: 0; padding: 0 0.25em 0 0; display: inline-block; } .cslist li:after { content: ", "; } .sslist li:after { content: "; "; } .cslist li:last-child:after, .sslist li:last-child:after { content: none; } b7fc7c7a6f4e14d23d0a7483f5727aec838c7a21 Module:Cslist 828 202 513 2020-09-18T15:45:25Z wikipedia>Izno 0 sync from sandbox Scribunto text/plain p = {} p.makelist = function(frame) local args = frame.args if not args[1] then args = frame:getParent().args if not args[1] then return end end local semi = (args.semi or ""):sub(1,1):lower() semi = (semi == "t") or (semi == "y") local embedded = (args.embedded or ""):sub(1,1):lower() embedded = (embedded == "y") local out = "" for k, v in ipairs(args) do v = mw.text.trim(v) if v ~= "" then out = out .. "<li>" .. v .. "</li>" end end local listclass = "" if semi then listclass = listclass .. "sslist" else listclass = listclass .. "cslist" end if embedded then listclass = listclass .. " cslist-embedded" end if out ~= "" then return '<ul class="'.. listclass ..'">' .. out .. '</ul>' end end return p 82fa872fef0f065ea5b7e6639e4390c93142fac9 Template:Uses TemplateStyles 10 80 197 2020-10-17T15:10:07Z meta>K6ka 0 Created page with "<div style="width:250px;float:right;clear:right;margin:0 0 1em 1em;border:1px solid black;-moz-border-radius:10px;-webkit-border-radius:10px;padding:10px 10px 10px 10px; backg..." wikitext text/x-wiki <div style="width:250px;float:right;clear:right;margin:0 0 1em 1em;border:1px solid black;-moz-border-radius:10px;-webkit-border-radius:10px;padding:10px 10px 10px 10px; background:#FFFFFF;"> <p style="margin:0 3% 0 3%;text-align:center;font-size:94%"> [[File:Farm-Fresh css add.svg|left|30px]] '''This template uses [[Help:TemplateStyles|TemplateStyles]]''' <br /> {{{1|}}} </p></div><includeonly>{{#ifeq:{{SUBPAGENAME}}|doc||[[Category:Templates that use TemplateStyles|{{PAGENAME}}]]}}</includeonly><noinclude> {{clr}} {{Documentation}}</noinclude> fed44ca463856190bcf6280438ed7ea020ad82c3 Template:Lang 10 102 277 2020-10-19T17:49:42Z wikipedia>Gonnym 0 wikitext text/x-wiki <includeonly>{{#invoke:Lang|{{{fn|lang}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> ed35aafbfe8198c5ad80fd861124244d0c7f2742 Module:WLink 828 203 515 2020-10-30T15:03:05Z wikipedia>Plastikspork 0 Import for [[Template:LDLBerlin]] Scribunto text/plain local WLink = { suite = "WLink", serial = "2016-10-05" }; --[=[ ansiPercent() formatURL() getArticleBase() getBaseTitle() getEscapedTitle() getExtension() getFile() getFragment() getLanguage() getNamespace() getPlain() getProject() getTarget() getTargetPage() getTitle() getWeblink() isBracketedLink() isBracketedURL() isCategorization() isExternalLink() isInterlanguage() isInterwiki() isMedia() isTitledLink() isValidLink() isWikilink() wikilink() failsafe() ]=] -- local globals local URLutil = false; local utilURL = function () -- Attach URLutil library module -- Postcondition: -- Returns table, with URLutil library -- Throws error, if not available if not URLutil then local lucky, util = pcall( require, "Module:URLutil" ); if lucky then if type( util ) == "table" then URLutil = util.URLutil(); end util = "library URLutil invalid"; end if type( URLutil ) ~= "table" then error( util, 0 ); end end return URLutil; end -- utilURL() local contentExtlink = function ( attempt ) -- Retrieve span of external link between brackets -- Precondition: -- attempt -- string, with presumable link -- the first char is expected to be "[" -- Postcondition: -- Returns string, number, number -- string including whitespace -- number with index of relevant "[" -- number with index after relevant "]" -- false if nothing found local r1 = false; local r2 = false; local r3 = attempt:find( "]", 2, true ); if r3 then local s = attempt:sub( 2, r3 - 1 ); local i = s:find( "[", 1, true ); if i then r1 = s:sub( i + 1 ); r2 = i; else r1 = s; r2 = 1; end else r3 = false; end return r1, r2, r3; end -- contentExtlink() local contentWikilink = function ( attempt ) -- Retrieve span of wikilink between brackets -- Precondition: -- attempt -- string, with presumable link -- the first two chars are expected to be "[[" -- Postcondition: -- Returns string, number, number -- string including whitespace -- number with index of relevant "[[" -- number with index after relevant "]]" -- false if nothing found local r1 = false; local r2 = false; local r3 = attempt:find( "]]", 3, true ); if r3 then local s = attempt:sub( 3, r3 - 1 ); local i = s:find( "[[", 1, true ); if i then r1 = s:sub( i + 2 ); r2 = i; else r1 = s; r2 = 1; end end return r1, r2, r3; end -- contentWikilink() local extractExtlink = function ( attempt ) -- Retrieve external link -- Precondition: -- attempt -- string, with presumable link -- the first char is expected to be "[" -- Postcondition: -- Returns string, string -- first with target and title -- second result false if not titled -- false if nothing found local r1 = false; local r2 = false; local s = contentExtlink( attempt ); if s then local i = s:find( "%s", 1 ); if i then r1 = s:sub( 1, i - 1 ); r2 = mw.text.trim( s:sub( i + 1 ) ); if r2 == "" then r2 = false; end else r1 = s; end if r1 then r1 = mw.text.trim( r1 ); if r1 == "" or not utilURL().isResourceURL( r1 ) then r1 = false; end end if not r1 then r2 = false; end end return r1, r2; end -- extractExtlink() local extractWikilink = function ( attempt ) -- Retrieve wikilink -- Precondition: -- attempt -- string, with presumable link -- the first two chars are expected to be "[[" -- Postcondition: -- Returns string, string -- first with target -- second result title, or false if not piped -- false if nothing found local r1 = false; local r2 = false; local s = contentWikilink( attempt ); if s then local i = s:find( "|", 1, true ); if i then r1 = s:sub( 1, i - 1 ); r2 = s:sub( i + 1 ); else r1 = s; end r1 = mw.text.trim( r1 ); if r1 == "" then r1 = false; else r1 = r1:gsub( "_", " " ) :gsub( "&nbsp;", " " ) :gsub( "&thinsp;", " " ) :gsub( "&#160;", " " ) :gsub( "&#8239;", " " ) :gsub( " +", " " ); r1 = mw.text.decode( r1 ); end end return r1, r2; end -- extractWikilink() local prefix = function ( ask, ahead ) -- Interprete prefix of language or project type -- Precondition: -- ask -- string, with presumable prefix -- ahead -- true, if first segment -- Postcondition: -- Returns string,string or nil -- first string one of "lead", "lang", "project" -- second string is formatted value -- type is one of "lead", "lang", "project" -- nil if nothing found local r1, r2; local prefixes = { b = true, c = "commons", d = true, commons = true, m = "meta", mediawiki = "mw", mw = true, meta = true, n = true, q = true, s = true, simple = false, v = true, voy = true, w = true, wikibooks = "b", wikidata = "d", wikinews = "n", wikipedia = "w", wikiquote = "q", wikisource = "s", wikiversity = "v", wikivoyage = "voy", wikt = true, wiktionary = "wikt" }; local s = mw.text.trim( ask ); if s == "" then if ahead then r1 = "lead"; r2 = true; end else local p; s = s:lower(); p = prefixes[ s ]; if p == true then r1 = "project"; r2 = s; elseif p then r1 = "project"; r2 = p; elseif p == false then r1 = "lang"; r2 = s; elseif s:match( "^%l%l%l?$" ) and mw.language.isSupportedLanguage( s ) then r1 = "lang"; r2 = s; end end return r1, r2; end -- prefix() local target = function ( attempt, lonely ) -- Retrieve first target (wikilink or URL), or entire string -- Precondition: -- attempt -- string, with presumable link somewhere -- lonely -- remove fragment, if true -- Postcondition: -- Returns string, number -- string, with detected link target, or entire -- number, with number of brackets, if found, or 2 local r1, r2 = WLink.getTarget( attempt ); if not r1 then r1 = mw.text.trim( attempt ); r2 = 2; end if lonely then local i = r1:find( "#", 1, true ); if i == 1 then r1 = ""; elseif i then r1 = r1:sub( 1, i - 1 ); end end return r1, r2; end -- target() function WLink.ansiPercent( attempt, alter ) -- Convert string by ANSI encoding rather than UTF-8 encoding -- Precondition: -- attempt -- string, with presumable ANSI characters -- alter -- string or nil, to use for spaces instead of %20 -- Postcondition: -- Returns string, encoded local k, s; local r = attempt; if alter then r = r:gsub( " ", alter ); end for i = mw.ustring.len( r ), 1, -1 do k = mw.ustring.codepoint( r, i, i ); if k <= 32 or k > 126 then if k > 255 then s = mw.ustring.sub( r, i, i ); if k > 2047 then s = string.format( "%%%2X%%%2X%%%2X", s:byte( 1, 1 ), s:byte( 2, 2 ), s:byte( 3, 3 ) ); else s = string.format( "%%%2X%%%2X", s:byte( 1, 1 ), s:byte( 2, 2 ) ); end else s = string.format( "%%%2X", k ); end r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i - 1 ), s, mw.ustring.sub( r, i + 1 ) ); end end -- for --i r = mw.ustring.gsub(r, '^%*', '%%2A') return r; end -- WLink.ansiPercent() function WLink.formatURL( adjust ) -- Create bracketed link, if not yet -- Precondition: -- adjust -- string, with URL or domain/path or bracketed link -- Postcondition: -- Returns string, with bracketed link -- false on invalid format local r; if type( adjust ) == "string" then if WLink.isBracketedLink( adjust ) then r = adjust; else local url = mw.text.trim( adjust ); local host; utilURL(); host = URLutil.getHost( adjust ); if not host then url = "http://" .. adjust; host = URLutil.getHost( url ); end if host then local path = URLutil.getRelativePath( url ); local show; if path == "/" then if not url:match( "/$" ) then url = url .. "/"; end show = host; else local i = path:find( "#" ); if i then path = path:sub( 1, i - 1 ); end show = host .. path; end r = string.format( "[%s %s]", url, show ); else r = adjust; end end else r = false; end return r; end -- WLink.formatURL() function WLink.getArticleBase( attempt ) -- Retrieve generic article title, no fragment nor brackets -- Precondition: -- attempt -- string, with wikilink or page title -- current page title, if missing -- Postcondition: -- Returns string, with identified lemma, or all -- false on invalid format local r; if attempt then local m; r, m = target( attempt, true ); if m ~= 2 then r = false; end else r = mw.title.getCurrentTitle().text; end if r then local sub = r:match( "^(.*%S) *%(.+%)$" ); if sub then r = sub; end end return r; end -- WLink.getArticleBase() function WLink.getBaseTitle( attempt ) -- Retrieve last segment in subpage, no fragment -- Precondition: -- attempt -- string, with wikilink or page title -- Postcondition: -- Returns string, with identified segment, or all local r; local s, m = target( attempt, true ); if m == 2 then local sub = s:match( "/([^/]+)$" ); if sub then r = sub; else r = s; end else r = false; end return r; end -- WLink.getBaseTitle() function WLink.getEscapedTitle( attempt ) -- Retrieve escaped link title -- Precondition: -- attempt -- string, with presumable link title -- Postcondition: -- Returns string, with suitable link title local s = mw.text.trim( attempt ); return s:gsub( "\n", " " ) :gsub( "%[", "&#91;" ) :gsub( "%]", "&#93;" ) :gsub( "|", "&#124;" ); end -- WLink.getEscapedTitle() function WLink.getExtension( attempt ) -- Retrieve media extension -- Precondition: -- attempt -- string, with wikilink (media link) or page title -- if URL, PDF may be detected -- Postcondition: -- Returns string, with detected downcased media type -- false if no extension found local r = false; local s, m = target( attempt ); if m == 2 then s = s:match( "%.(%a+)$" ); if s then r = s:lower(); end elseif s:upper():match( "[%./](PDF)%W?" ) then r = "pdf"; end return r; end -- WLink.getExtension() function WLink.getFile( attempt ) -- Retrieve media page identifier -- Precondition: -- attempt -- string, with wikilink (media link) or page title -- Postcondition: -- Returns string, with detected file title -- no namespace nor project -- false if no file found local r = false; local s, m = target( attempt ); if m == 2 then local slow = ":" .. s:lower(); local find = function ( a ) local seek = string.format( ":%s:().+%%.%%a+$", a:lower() ); local join = slow:find( seek ); local ret; if join then ret = s:sub( join + #a + 1 ); end return ret; end; r = find( "file" ); if not r then local trsl = mw.site.namespaces[6]; r = find( trsl.name ); if not r then trsl = trsl.aliases; for k, v in pairs( trsl ) do r = find( v ); if r then break; -- for k, v end end -- for k, v end end end return r; end -- WLink.getFile() function WLink.getFragment( attempt ) -- Retrieve fragment -- Precondition: -- attempt -- string, with presumable fragment -- Postcondition: -- Returns string, with detected fragment -- false if no address found local r = false; local s, m = target( attempt ); if s then local i = s:find( "#", 1, true ); if i then if i > 1 then s = s:sub( i - 1 ); i = 2; end if s:find( "&#", 1, true ) then s = mw.text.decode( s ); i = s:find( "#", 1, true ); if not i then s = ""; i = 0; end end s = s:sub( i + 1 ); r = mw.text.trim( s ); if r == "" then r = false; elseif m == 2 then r = r:gsub( "%.(%x%x)", "%%%1" ) :gsub( "_", " " ); r = mw.uri.decode( r, "PATH" ); end end end return r; end -- WLink.getFragment() function WLink.getLanguage( attempt ) -- Retrieve language project identifier -- Precondition: -- attempt -- string, with wikilink or page title -- Postcondition: -- Returns string, with detected downcased language identifier -- false if no project language found local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.lang then r = w.lang; end end return r; end -- WLink.getLanguage() function WLink.getNamespace( attempt ) -- Retrieve namespace number -- Precondition: -- attempt -- string, with wikilink or page title -- Postcondition: -- Returns number, of detected namespace -- false if no namespace found local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and not w.lang and not w.project and w.ns then r = w.ns; end end return r; end -- WLink.getNamespace() function WLink.getPlain( attempt ) -- Retrieve text with all links replaced by link titles -- Precondition: -- attempt -- string, with wikitext -- Postcondition: -- Returns string, with modified wikitext without links local r = attempt; local i = 1; local j, k, n, lean, s, shift, space, suffix; while ( true ) do j = r:find( "[", i, true ); if j then suffix = r:sub( j ); i = j + 1; lean = ( r:byte( i, i ) == 91 ); if lean then s, k, n = contentWikilink( suffix ); else s, k, n = contentExtlink( suffix ); end if s then if k > 1 then n = n - k; i = j + k; j = i - 1; suffix = r:sub( j ); end if lean then s, shift = extractWikilink( suffix ); if s then space = s:match( "^([^:]+):" ); if space then space = mw.site.namespaces[ space ]; if space then space = space.id; end end if space == 6 or space == 14 then shift = ""; elseif not shift then shift = s; end else s = ""; shift = ""; end else s, shift = extractExtlink( suffix ); if not s then s = ""; end if not shift then shift = ""; end i = i - 1; end if j > 1 then s = r:sub( 1, j - 1 ); else s = ""; end r = string.format( "%s%s%s", s, shift, r:sub( n + i ) ); i = i + #shift; else break; -- while true end else break; -- while true end end -- while true return r; end -- WLink.getPlain() function WLink.getProject( attempt ) -- Retrieve wikifarm project identifier -- Precondition: -- attempt -- string, with wikilink or page title -- Postcondition: -- Returns string, with detected downcased project identifier -- false if no project identifier found local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.project then r = w.project; end end return r; end -- WLink.getProject() function WLink.getTarget( attempt ) -- Retrieve first target (wikilink or URL) -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns string, number -- string, with first detected link target -- number, with number of brackets, if found -- false if nothing found local r1 = false; local r2 = false; local i = attempt:find( "[", 1, true ); if i then local m; r1 = attempt:sub( i ); if r1:byte( 2, 2 ) == 91 then m = 2; r1 = extractWikilink( r1 ); else m = 1; r1 = extractExtlink( r1 ); end if r1 then r2 = m; end else r1 = attempt:match( "%A?([hf]t?tps?://%S+)%s?" ); if r1 then if utilURL().isResourceURL( r1 ) then r2 = 0; else r1 = false; end else r1 = false; end end return r1, r2; end -- WLink.getTarget() function WLink.getTargetPage( attempt ) -- Retrieve first target page (page name or URL of page) -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns string, with first detected linked page -- false if nothing found local r1, r2 = WLink.getTarget( attempt ); if r1 then local i = r1:find( "#", 1, true ); if i then if i == 1 then r1 = false; else r1 = mw.text.trim( r1:sub( 1, i - 1 ) ); end end end return r1, r2; end -- WLink.getTargetPage() function WLink.getTitle( attempt ) -- Retrieve first link title (wikilink or URL), or wikilink target -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns string, with first detected link target -- false if nothing found local r = false; local i = attempt:find( "[", 1, true ); if i then local s1, s2; r = attempt:sub( i ); if r:byte( 2, 2 ) == 91 then s1, s2 = extractWikilink( r ); if s2 then r = s2; else r = s1; end else s1, r = extractExtlink( r ); end end return r; end -- WLink.getTitle() function WLink.getWeblink( attempt, anURLutil ) -- Retrieve bracketed link from resource URL -- Precondition: -- attempt -- string, with URL, or something different -- anURLutil -- library module object, or nil -- Postcondition: -- Returns string, with first detected link target -- false if nothing found local second = ".ac.co.go.gv.or."; local r; if type( anURLutil ) == "table" then URLutil = anURLutil; else utilURL(); end if URLutil.isResourceURL( attempt ) then local site = URLutil.getAuthority( attempt ); local show; if #attempt == #site then site = site .. "/"; end show = URLutil.getTop3domain( "//" .. site ); if show then local scan = "[%./](%a+)(%.%l%l%.)(%a+)$"; local search = "." .. show; local s1, s2, s3 = search:match( scan ); if s2 then if not second:find( s2, 1, true ) then show = string.format( "%s.%s", s2, s3 ); end else show = false; end end if not show then show = URLutil.getTop2domain( "//" .. site ); if not show then show = URLutil.getHost( "//" .. site ); end end r = string.format( "[%s %s]", attempt, show ); else r = attempt; end return r; end -- WLink.getWeblink() function WLink.isBracketedLink( attempt ) -- Does attempt match a bracketed link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local i = attempt:find( "[", 1, true ); if i then local s = attempt:sub( i ); if s:byte( 2, 2 ) == 91 then s = extractWikilink( s ); else s = extractExtlink( s ); end if s then r = true; end end return r; end -- WLink.isBracketedLink() function WLink.isBracketedURL( attempt ) -- Does attempt match a bracketed URL? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local s, r = WLink.getTarget( attempt ); return ( r == 1 ); end -- WLink.isBracketedURL() function WLink.isCategorization( attempt ) -- Does attempt match a categorization? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.ns == 14 and not ( w.lead or w.lang or w.project ) and w.title ~= "" then r = true; end end return r; end -- WLink.isCategorization() function WLink.isExternalLink( attempt ) -- Does attempt match an external link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local s, r = WLink.getTarget( attempt ); if r then r = ( r < 2 ); end return r; end -- WLink.isExternalLink() function WLink.isInterlanguage( attempt ) -- Does attempt match an interlanguage link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.lang and not w.project and not w.lead and w.title ~= "" then r = true; end end return r; end -- WLink.isInterlanguage() function WLink.isInterwiki( attempt ) -- Does attempt match an interwiki link within wikifarm? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and ( w.lang or w.project ) and w.title ~= "" then r = true; end end return r; end -- WLink.isInterwiki() function WLink.isMedia( attempt ) -- Does attempt match a media translusion? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.ns == 6 and not ( w.lead or w.lang or w.project ) and w.title ~= "" and WLink.getExtension( w.title ) then r = true; end end return r; end -- WLink.isMedia() function WLink.isTitledLink( attempt ) -- Does attempt match a titled link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local i = attempt:find( "[", 1, true ); if i then local c, n; local s = attempt:sub( i ); if s:byte( 2, 2 ) == 91 then n = s:find( "%]%]", 5 ); c = "|"; else n = s:find( "%]", 8 ); c = "%s%S"; end if n then local m = s:find( c, 2 ); if m and m + 1 < n and WLink.getTarget( attempt ) then r = true; end end end return r; end -- WLink.isTitledLink() function WLink.isValidLink( attempt ) -- Does attempt match a link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local s, r = WLink.getTarget( attempt ); if r then r = true; end return r; end -- WLink.isValidLink() function WLink.isWikilink( attempt ) -- Does attempt match a wikilink? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local s, m = WLink.getTarget( attempt ); return ( m == 2 ); end -- WLink.isWikilink() function WLink.wikilink( attempt ) -- Retrieve wikilink components -- Precondition: -- attempt -- string, with presumable link -- expected to be enclosed in "[[" "]]" -- else wikilink -- Postcondition: -- Returns table or false -- table of assignments with { type, value} -- type is one of "lead", -- "project", "lang", -- "ns", "space", "title" -- false if nothing found local s = contentWikilink( attempt ); local got, n, r; if not s then s = attempt; end i = s:find( "|", 1, true ); if i then s = s:sub( 1, i - 1 ); end got = mw.text.split( s, ":" ); n = table.maxn( got ); if n == 1 then r = { title = mw.text.trim( s ) }; else local j, k, o, v; r = { title = "" }; if n > 4 then k = 4; else k = n - 1; end j = k; for i = 1, j do s = mw.text.trim( got[ i ] ); if s ~= "" then o = mw.site.namespaces[ mw.text.trim( got[ i ] ) ]; if o then r.ns = o.id; r.space = o.name; k = i + 1; j = i - 1; break; -- for i end end end -- for i for i = 1, j do o, v = prefix( got[ i ], ( i == 1 ) ); if o then if r[ o ] then k = i; break; -- for i else r[ o ] = v; end else k = i; break; -- for i end end -- for i for i = k, n do r.title = r.title .. got[ i ]; if i < n then r.title = r.title .. ":"; end end -- for i end if r.lead and ( r.project or not r.title or ( not r.lang and r.ns ~= 6 and r.ns ~= 14 ) ) then r.lead = false; end return r; end -- WLink.wikilink() function WLink.failsafe( assert ) -- Retrieve versioning and check for compliance -- Precondition: -- assert -- string, with required version, or false -- Postcondition: -- Returns string with appropriate version, or false local r; if assert and assert > WLink.serial then r = false; else r = WLink.serial; end return r end -- WLink.failsafe() local function Template( frame, action, leave, lone ) -- Run actual code from template transclusion -- Precondition: -- frame -- object -- action -- string, with function name -- leave -- true: keep whitespace around -- lone -- true: permit call without parameters -- Postcondition: -- Return string; might be error message local lucky = true; local s = false; local r = false; local space; for k, v in pairs( frame.args ) do if k == 1 then if leave then s = v; else s = mw.text.trim( v ); end elseif action == "ansiPercent" and k == "space" then if v ~= "" then space = v; end elseif k ~= "template" then lucky = false; if r then r = r .. "|"; else r = "Unknown parameter: "; end r = string.format( "%s%s=", r, k ); end end -- for k, v if lucky then if s or lone then lucky, r = pcall( WLink[ action ], s, space ); else r = "Parameter missing"; lucky = false; end end if lucky then if type( r ) == "boolean" then if r then r = "1"; else r = ""; end end else r = string.format( "<span class=\"error\">%s</span>", r ); end return r; end -- Template() -- Export local p = { }; p.ansiPercent = function ( frame ) return Template( frame, "ansiPercent" ); end p.formatURL = function ( frame ) return Template( frame, "formatURL" ); end p.getArticleBase = function ( frame ) return Template( frame, "getArticleBase", false, true ); end p.getBaseTitle = function ( frame ) return Template( frame, "getBaseTitle" ); end p.getEscapedTitle = function ( frame ) return Template( frame, "getEscapedTitle" ); end p.getExtension = function ( frame ) return Template( frame, "getExtension" ); end p.getFile = function ( frame ) return Template( frame, "getFile" ); end p.getFragment = function ( frame ) return Template( frame, "getFragment" ); end p.getInterwiki = function ( frame ) return Template( frame, "getInterwiki" ); end p.getLanguage = function ( frame ) return Template( frame, "getLanguage" ); end p.getNamespace = function ( frame ) return tostring( Template( frame, "getNamespace" ) ); end p.getPlain = function ( frame ) return Template( frame, "getPlain" ); end p.getProject = function ( frame ) return Template( frame, "getProject" ); end p.getTarget = function ( frame ) return Template( frame, "getTarget" ); end p.getTargetPage = function ( frame ) return Template( frame, "getTargetPage" ); end p.getTitle = function ( frame ) return Template( frame, "getTitle" ); end p.getWeblink = function ( frame ) return Template( frame, "getWeblink" ); end p.isBracketedLink = function ( frame ) return Template( frame, "isBracketedLink" ); end p.isBracketedURL = function ( frame ) return Template( frame, "isBracketedURL" ); end p.isCategorization = function ( frame ) return Template( frame, "isCategorization" ); end p.isExternalLink = function ( frame ) return Template( frame, "isExternalLink" ); end p.isInterlanguage = function ( frame ) return Template( frame, "isInterlanguage" ); end p.isInterwiki = function ( frame ) return Template( frame, "isInterwiki" ); end p.isMedia = function ( frame ) return Template( frame, "isMedia" ); end p.isTitledLink = function ( frame ) return Template( frame, "isTitledLink" ); end p.isValidLink = function ( frame ) return Template( frame, "isValidLink" ); end p.isWeblink = function ( frame ) return Template( frame, "isWeblink" ); end p.isWikilink = function ( frame ) return Template( frame, "isWikilink" ); end p.failsafe = function ( frame ) local since = frame.args[ 1 ]; if since then since = mw.text.trim( since ); if since == "" then since = false; end end return WLink.failsafe( since ) or ""; end p.WLink = function () return WLink; end return p; af57214e9ddc77f93c9fcb1dd97b58d8180700d4 Module:Documentation/styles.css 828 52 101 2020-11-19T20:21:58Z wikipedia>Izno 0 Changed protection level for "[[Module:Documentation/styles.css]]": actually match module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Template:Tnull 10 204 517 2020-11-20T18:16:50Z wikipedia>Primefac 0 Primefac moved page [[Template:Tnull]] to [[Template:Template link null]]: more obvious template name to match family wikitext text/x-wiki #REDIRECT [[Template:Template link null]] {{Redirect category shell| {{R from move}} }} b22d666a4b16808dc3becc2403546fb9ab5dea7e Template:Tld 10 120 313 2020-11-20T18:52:18Z wikipedia>Primefac 0 avoid redir wikitext text/x-wiki #REDIRECT [[Template:Template link code]] be5d6275ea41d83224503e05901f3405c82141f7 Template:Tlx 10 21 39 2020-11-20T18:53:35Z wikipedia>Primefac 0 Primefac moved page [[Template:Tlx]] to [[Template:Template link expanded]] over redirect: expand name, make it more obvious wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Template:Template link with parameters 10 119 311 2020-11-21T12:04:32Z wikipedia>Primefac 0 wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlp}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 8fe73a6eea633360a927820d10469b7292bfc1c2 Template:Template link expanded 10 22 41 2020-11-21T12:04:41Z wikipedia>Primefac 0 update wikitext text/x-wiki {{#Invoke:Template link general|main|code=on}}<noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlx}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6c99696fee02f1da368ed20d2504e19bc15b1c13 Template:Template link with link off 10 55 107 2020-11-21T12:06:17Z wikipedia>Primefac 0 update wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes|nolink=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlf}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> b099fea5d1f36b0b4b9cb253ad3a9f4e095f6851 Template:Template link code 10 117 307 2020-11-21T12:06:22Z wikipedia>Primefac 0 update wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlc}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 044f00ca1bfc10cb967c32e893043ccc6f739764 Template:Template link null 10 205 519 2020-11-21T12:06:41Z wikipedia>Primefac 0 update wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tnull}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 2167c503e001d24d870ef82a9de0aaa9832404cb Template:COinS safe 10 123 321 2020-12-10T09:01:22Z wikipedia>Andrybak 0 [[:File:Stop hand nuvola.svg]] is licensed under "Creative Commons Attribution-ShareAlike 2.5", link is required for attribution — Undid revision 987128260 by [[Special:Contributions/JsfasdF252|JsfasdF252]] ([[User talk:JsfasdF252|talk]]) wikitext text/x-wiki {{notice |image={{#ifeq: {{{1|}}}|n|Stop hand nuvola.svg}} |{{#ifeq: {{{1|}}}|n |This template should not be used in citation templates such as [[Help:Citation Style 1|Citation Style 1]] and [[Help:Citation Style 2|Citation Style 2]], because it includes markup that will pollute the [[COinS]] metadata they produce; see [[Wikipedia:COinS]]. {{{addtext|}}}{{Sandbox other||[[Category:Templates not safe for use in citation templates]]}} |This template is safe for use in citation templates that produce [[COinS]] metadata; see [[Wikipedia:COinS]]. If HTML or other markup is added, then the template must be reevaluated. {{{addtext|}}} }} }}<noinclude> {{Documentation}} <!-- Please add categories to the /doc subpage, and interwikis at Wikidata (see Wikipedia:Wikidata) --> </noinclude> 47abee673d74440d28e801111bf6ee765cd998df Template:Tl 10 7 11 2021-02-12T22:03:00Z wikipedia>Anthony Appleyard 0 Anthony Appleyard moved page [[Template:Tl]] to [[Template:Template link]]: [[Special:Permalink/1006428669|Requested]] by Buidhe at [[WP:RM/TR]]: RM closed as move wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Template:Div col 10 44 85 2021-02-14T23:20:57Z wikipedia>Matt Fitzpatrick 0 whitelist parameter class wikitext text/x-wiki <includeonly><templatestyles src="Div col/styles.css"/><!-- --><div class="div-col {{#ifeq:{{{small|}}}|yes|div-col-small}} {{#ifeq:{{{rules|}}}|yes|div-col-rules}} {{{class|}}}" <!-- -->{{#if:{{{colwidth|}}}{{{gap|}}}{{{style|}}}|<!-- -->style="{{#if:{{{colwidth|}}}|column-width: {{{colwidth}}};}}{{#if:{{{gap|}}}|column-gap: {{{gap}}};}}{{#if:{{{style|}}}|{{{style}}}}}"<!-- -->}}><!-- -->{{#if:{{{content|}}}|{{{content}}}</div>}}<!-- Inventory how many pages use small=yes -->{{#ifeq:{{{small|}}}|yes|[[Category:Pages using div col with small parameter]]}}<!-- --></includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using div col with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Div col]] with unknown parameter "_VALUE_"; use colwidth= to specify column size |ignoreblank=y | class | colwidth | content | gap | rules | small | style }}<noinclude> {{Documentation}} </noinclude> 6e84133dd867d6c701e7b161878cf66665bb7eb7 Template:Template shortcut 10 219 547 2021-02-16T17:54:32Z wikipedia>Nardog 0 TfM closed as convert wikitext text/x-wiki <includeonly>{{#invoke:Shortcut|main|template=yes}}</includeonly><noinclude>{{Documentation}}</noinclude> bfb2889c4c0ec36294b7b667f5e03350d2df680e Module:Shortcut/config 828 213 535 2021-02-16T18:43:45Z wikipedia>Nardog 0 Scribunto text/plain -- This module holds configuration data for [[Module:Shortcut]]. return { -- The heading at the top of the shortcut box. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) ['shortcut-heading'] = '[[Wikipedia:Shortcut|{{PLURAL:$1|Shortcut|Shortcuts}}]]', -- The heading when |redirect=yes is given. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) ['redirect-heading'] = '[[Wikipedia:Redirect|{{PLURAL:$1|Redirect|Redirects}}]]', -- The error message to display when a shortcut is invalid (is not a string, or -- is the blank string). It accepts the following parameter: -- $1 - the number of the shortcut in the argument list. (required) ['invalid-shortcut-error'] = 'shortcut #$1 was invalid (shortcuts must be ' .. 'strings of at least one character in length)', -- The error message to display when no shortcuts or other displayable content -- were specified. (required) ['no-content-error'] = 'Error: no shortcuts were specified and the ' .. mw.text.nowiki('|msg=') .. ' parameter was not set.', -- A category to add when the no-content-error message is displayed. (optional) ['no-content-error-category'] = 'Shortcut templates with missing parameters', } f9d1d94844d5953753eb19e30a3ce389eda3d319 Template:Nowiki2 10 228 567 2021-02-18T18:38:29Z wikipedia>Jonesey95 0 Reverted 1 edit by [[Special:Contributions/154.133.144.234|154.133.144.234]] ([[User talk:154.133.144.234|talk]]) to last revision by Ans wikitext text/x-wiki {{#if: {{{tag|}}} | {{#if: {{{style|}}} | <{{{tag}}} style="{{{style}}}"> | <{{{tag}}}> }} }}{{#invoke:LuaCall | call | mw.text.nowiki |\{{{1|}}}<!-- -->}}{{#if: {{{tag|}}} | </{{{tag}}}> }}<noinclude> {{Documentation}} </noinclude> 2712eeff2099493a4151603b9ed4ea74e51fa6ed Template:Template link 10 8 13 2021-03-25T19:03:22Z wikipedia>Izno 0 [[Wikipedia:Templates for discussion/Log/2021 March 18#Template:Tlu]] closed as keep ([[WP:XFDC#4.0.11|XFDcloser]]) wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Template:Glossary end 10 210 529 2021-05-14T06:45:23Z wikipedia>ಮಲ್ನಾಡಾಚ್ ಕೊಂಕ್ಣೊ 0 Balance tag using noinclude to remove page from Linter report wikitext text/x-wiki <noinclude><dl></noinclude></dl><!--end glossary--><noinclude> {{Documentation|Template:Glossary/doc}}<!--Categories go in the /doc subpage.--> </noinclude> ed16ee7194c9e6e05c38ab0d43496928c52bc915 Template:Endplainlist 10 198 505 2021-05-14T07:01:30Z wikipedia>WOSlinker 0 fix lint wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Plainlist/doc}} </noinclude> d545c41582328dd4f197e2b1848c8ad7392b92e0 Template:Category link with count 10 66 129 2021-06-11T18:13:44Z wikipedia>GKFX 0 Support wider range of (valid) input format wikitext text/x-wiki [[:Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|<!-- -->{{#if:{{{name|}}}|{{{name}}}|Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}}}<!-- -->]]&nbsp;({{PAGESINCATEGORY:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|{{{2|all}}}}})<noinclude> {{Documentation}} </noinclude> f93f1540b8c157703bd6d24ae35c35bef745981d Module:Hatnote/styles.css 828 34 65 2021-07-12T19:22:27Z wikipedia>Izno 0 per my talk page text text/plain /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Template:Thin space 10 90 253 2021-07-22T18:00:13Z wikipedia>MusikBot II 0 Protected "[[Template:Thin space]]": [[Wikipedia:High-risk templates|High-risk template or module]] ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki <span style="white-space: nowrap;">{{#if:{{{1|}}}|{{#if:{{{2|}}}||&thinsp;}}}}{{{1|}}}&thinsp;<!-- -->{{#if:{{{2|}}}|{{{2}}}}}{{#if:{{{3|}}}|&thinsp;{{{3}}}}}<!-- -->{{#if:{{{4|}}}|&thinsp;{{{4}}}}}{{#if:{{{5|}}}|&thinsp;{{{5}}}}}<!-- -->{{#if:{{{6|}}}|&thinsp;{{{6}}}}}{{#if:{{{7|}}}|&thinsp;{{{7}}}}}<!-- -->{{#if:{{{8|}}}|&thinsp;{{{8}}}}}{{#if:{{{9|}}}|&thinsp;{{{9}}}}}<!-- -->{{#if:{{{10|}}}|&thinsp;{{{10}}}}}</span><noinclude> {{Documentation}} <!-- Please add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5f135f79d223a744b75485254555580623480420 Module:Redirect 828 170 447 2021-09-10T07:46:37Z wikipedia>Johnuniq 0 restore p.getTargetFromText which is used by [[Module:RfD]] which is causing "Lua error in Module:RfD at line 87: attempt to call upvalue 'getTargetFromText' (a nil value)" Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 Template:TOC right 10 109 291 2021-09-17T13:06:17Z wikipedia>Izno 0 don't emit style unless width exists wikitext text/x-wiki <templatestyles src="Template:TOC_right/styles.css" />{{#if:{{{limit|}}}|<templatestyles src="Template:TOC limit/styles.css" />}}<!-- --><div class="tocright {{#if:{{{clear|}}}|tocright-clear-{{{clear|}}}}} {{#if:{{{limit|}}}|toclimit-{{{limit}}}}}" {{#if:{{{width|{{{1|}}}}}}|style="width: {{{width|{{{1}}}}}};"}}>__TOC__</div><noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 67c60b46e441afa40d8c4c1227aa6580a0cda2e9 Template:TOC right/styles.css 10 110 293 2021-09-17T13:56:38Z wikipedia>Izno 0 do the same thing I apparently did to tocleft much earlier sanitized-css text/css /* {{pp-template}} */ /* The TOC is hidden on Minerva (mobile skin) for width < 720px so must also hide this wrapper */ @media all and (max-width: 720px) { body.skin-minerva .tocright { display: none; } .tocright { width: 100% !important; /* fix the inline width while at small resolution */ } } @media all and (min-width: 720px) { .tocright { float: right; clear: right; width: auto; margin: 0 0 0.5em 1em; } .tocright-clear-left { clear: left; } .tocright-clear-both { clear: both; } .tocright-clear-none { clear: none; } } 60435a52ddabf7eb321fa80dbf78c0d63d13f95b Module:Sidebar/styles.css 828 43 83 2021-09-20T01:15:45Z wikipedia>Goszei 0 self-rv, it's a little tight text text/plain /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: #f8f9fa; border: 1px solid #aaa; padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } 7d621b35a37807a103b59075851fe36201204ceb Template:Format TemplateData 10 222 555 2021-10-05T19:23:32Z wikipedia>MusikBot II 0 Protected "[[Template:Format TemplateData]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 305 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki <includeonly>{{#ifeq:{{yesno-yes|{{{header}}}}}|yes|{{TemplateData header}} }}{{#invoke:Format TemplateData| f |classNoNumTOC=nonumtoc |cssParams=border:#B3B7FF 1px solid;|docpageCreate=%s/doc |docpageDetect=/doc$ |msgDescMiss=Missing description |cat=Templates with TemplateData errors}}</includeonly><noinclude> {{Documentation}} </noinclude> 9f91faf4253ddd2a7da1f06be8940e26509a0cd6 Module:Suppress categories 828 68 133 2021-10-26T17:25:37Z wikipedia>MusikBot II 0 Changed protection settings for "[[Module:Suppress categories]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 2510 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) Scribunto text/plain -- This is a simple module to strip categories from wikitext. It does -- not support nested links or magic words like __TOC__, etc. Even so, -- it should still handle most categories. local p = {} -- Detects if a category link is valid or not. If it is valid, -- the function returns the blank string. If not, the input -- is returned with no changes. local function processCategory( all, submatch ) local beforePipe = mw.ustring.match( submatch, '^(.-)[%s_]*|[%s_]*.-$' ) beforePipe = beforePipe or submatch if mw.ustring.match( beforePipe, '[%[%]<>{}%c\n]' ) then return all else return '' end end -- Preprocess the content if we aren't being called from #invoke, -- and pass it to gsub to remove valid category links. local function suppress( content, isPreprocessed ) if not isPreprocessed then content = mw.getCurrentFrame():preprocess( content ) end content = mw.ustring.gsub( content, '(%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*(.-)[%s_]*%]%])', processCategory ) return content end -- Get the content to suppress categories from, and find -- whether the content has already been preprocessed. (If the -- module is called from #invoke, it has been preprocessed already.) function p.main( frame ) local content, isPreprocessed if frame == mw.getCurrentFrame() then content = frame:getParent().args[1] if frame.args[1] then content = frame.args[1] end isPreprocessed = true else content = frame isPreprocessed = false end return suppress( content, isPreprocessed ) end return p 0ec3903841c489357a879434c5dc23c11d182c78 Template:Infobox/doc 10 70 195 2021-10-28T12:43:53Z meta>Startus 0 Add wikitext text/x-wiki {{Documentation subpage}} {{Lua|Module:Infobox}} {{Uses TemplateStyles|[[Module:Infobox/styles.css]]}} ==Usage== c98286012fccf1f2eab447f27d4e51c9fb5aac2c Template:Navbox bottom 10 188 483 2021-11-04T17:59:51Z wikipedia>MusikBot II 0 Protected "[[Template:Navbox bottom]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 3929 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) wikitext text/x-wiki <includeonly>{{#invoke:navbox top and bottom|bottom}}</includeonly><noinclude> {{documentation|Template:Navbox top/doc}}</noinclude> 65e502a67d1bc2bba488cdada997a395b417883c Template:Navbox top 10 189 485 2021-11-04T17:59:52Z wikipedia>MusikBot II 0 Protected "[[Template:Navbox top]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 3930 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) wikitext text/x-wiki <includeonly>{{#invoke:navbox top and bottom|top}}</includeonly><noinclude> {{documentation}} </noinclude> d92793ae2725f6cbd0007a404bcce9a530d30349 Module:Navbox top and bottom 828 190 487 2021-11-04T18:00:00Z wikipedia>MusikBot II 0 Protected "[[Module:Navbox top and bottom]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 3931 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) Scribunto text/plain -- This implements {{navbox top}} and {{navbox bottom}} local p = {} local function build_navbox(parentArgs, list) local args = {} for argName, value in pairs(parentArgs) do if value ~= '' then if type(argName) == 'string' then args[argName] = value end end end args['bodystyle'] = 'display:table;' .. (args['bodystyle'] or '') args['list1padding'] = '0' args['list1style'] = 'border-width:0;' args['list1'] = list -- Note Navbox.navbox() has a kludge to order the parent frame's args -- into a specific order. For now, this is omitted from this module. local Navbox = require('Module:Navbox') return Navbox._navbox(args) end function p.top(frame) local args = frame:getParent().args local parts = mw.text.split(build_navbox(args, '<ADD LIST HERE>'), '<ADD LIST HERE>') return parts[1] end function p.bottom(frame) local args = frame:getParent().args local parts = mw.text.split(build_navbox(args, '<ADD LIST HERE>'), '<ADD LIST HERE>') return parts[2] end return p ac5dfc18e5611b01115dbf9818d1cf54ee5156d2 Template:Main other 10 12 21 2021-12-10T16:08:06Z wikipedia>Xaosflux 0 <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Module:Navbox/styles.css 828 181 469 2021-12-21T22:10:10Z wikipedia>Izno 0 remove qualifications on th - this will remove styling from "hand-crafted" navboxes, but there's no other elegant way to deal with it. see talk page sanitized-css text/css /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Template:Ifsubst 10 172 451 2022-01-02T08:48:20Z wikipedia>Dinoguy1000 0 fix "|=foo" bug wikitext text/x-wiki {{ safesubst:<noinclude/>#if:{{{demo|}}} |{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }} |{{ safesubst:<noinclude/>#ifeq:{{ safesubst:<noinclude/>NAMESPACE}}|{{NAMESPACE}} |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }}}}<noinclude> {{Documentation}} </noinclude> 38e667b5df326086489bf557a5f7c4e43393af78 Template:No redirect 10 197 503 2022-01-02T09:07:18Z wikipedia>Dinoguy1000 0 fix "|=foo" bug wikitext text/x-wiki {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} }}<noinclude> {{documentation}} </noinclude> 1760035b1bed54ee08b810208ed3551b812dfe13 Module:Navbar/styles.css 828 38 73 2022-01-03T23:12:15Z wikipedia>Izno 0 navbar styles that were moved to parent templates text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Module:Infobox/styles.css 828 18 33 2022-01-18T15:18:00Z wikipedia>Jdlrobson 0 Fix [[phab:T281642]], a pet peeve of mine. This copies across styles from [[MediaWiki:Minerva.css]] text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:TableTools 828 20 37 2022-01-31T13:08:18Z wikipedia>MSGJ 0 updates/fixes requested by [[User:Uzume]] Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Module:Check for unknown parameters 828 15 27 2022-02-21T05:24:13Z wikipedia>BusterD 0 Changed protection settings for "[[Module:Check for unknown parameters]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Module:Effective protection expiry 828 29 55 2022-02-23T10:59:29Z wikipedia>Xaosflux 0 Changed protection settings for "[[Module:Effective protection expiry]]": used in the mediawiki interface / match [[Module:Effective protection level]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Module:Template link general 828 23 43 2022-03-08T08:30:51Z wikipedia>Primefac 0 update from sandbox - fixes to _show_result and adding _expand Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Template:Documentation 10 49 95 2022-03-29T02:14:34Z wikipedia>Bsherr 0 consistent with new substitution template format wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 Template:Lit 10 115 303 2022-04-03T17:59:39Z wikipedia>MusikBot II 0 Changed protection settings for "[[Template:Lit]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 2502 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) wikitext text/x-wiki #REDIRECT [[Template:Literal translation]] 38b4e908291ac0a1fa8482ed0f8d5631c6a213e6 Module:Bold list 828 229 569 2022-04-26T07:59:10Z wikipedia>Peter coxhead 0 correction Scribunto text/plain -- Written by User:Ahecht in response to a thread at [[WP:VPI]] return { main = function(frame) args = {} for i, v in ipairs(frame:getParent().args) do table.insert(args, v) end conj = "'''" .. (#args > 2 and ", " or " ") .. (frame.args.conj or "or") .. " '''" return "'''"..mw.text.listToText(args, "''', '''", conj).."'''" end } 48d1ae74e90832a1b3366b51745334f53a668249 Module:Labelled list hatnote 828 104 281 2022-06-08T23:33:35Z wikipedia>Nihiltres 0 Fixed iteration-and-removal bug Scribunto text/plain -------------------------------------------------------------------------------- -- Labelled list -- -- -- -- This module does the core work of creating a hatnote composed of a list -- -- prefixed by a colon-terminated label, i.e. "LABEL: [andList of pages]", -- -- for {{see also}} and similar templates. -- -------------------------------------------------------------------------------- local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local yesno --initialize lazily local p = {} -- Defaults global to this module local defaults = { label = 'See also', --Final fallback for label argument labelForm = '%s: %s', prefixes = {'label', 'label ', 'l'}, template = 'Module:Labelled list hatnote' } -- Localizable message strings local msg = { errorSuffix = '#Errors', noInputWarning = 'no page names specified', noOutputWarning = "'''[[%s]] — no output: none of the target pages exist.'''" } -- Helper function that pre-combines display parameters into page arguments. -- Also compresses sparse arrays, as a desirable side-effect. function p.preprocessDisplays (args, prefixes) -- Prefixes specify which parameters, in order, to check for display options -- They each have numbers auto-appended, e.g. 'label1', 'label 1', & 'l1' prefixes = prefixes or defaults.prefixes local indices = {} local sparsePages = {} for k, v in pairs(args) do if type(k) == 'number' then indices[#indices + 1] = k local display for i = 1, #prefixes do display = args[prefixes[i] .. k] if display then break end end sparsePages[k] = display and string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v end end table.sort(indices) local pages = {} for k, v in ipairs(indices) do pages[#pages + 1] = sparsePages[v] end return pages end --Helper function to get a page target from a processed page string --e.g. "Page|Label" → "Page" or "Target" → "Target" local function getTarget(pagename) local pipe = string.find(pagename, '|') return string.sub(pagename, 0, pipe and pipe - 1 or nil) end -- Produces a labelled pages-list hatnote. -- The main frame (template definition) takes 1 or 2 arguments, for a singular -- and (optionally) plural label respectively: -- * {{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}} -- The resulting template takes pagename & label parameters normally. function p.labelledList (frame) mArguments = require('Module:Arguments') yesno = require('Module:Yesno') local labels = {frame.args[1] or defaults.label} labels[2] = frame.args[2] or labels[1] labels[3] = frame.args[3] --no defaulting labels[4] = frame.args[4] --no defaulting local template = frame:getParent():getTitle() local args = mArguments.getArgs(frame, {parentOnly = true}) local pages = p.preprocessDisplays(args) local options = { category = yesno(args.category), extraclasses = frame.args.extraclasses, ifexists = yesno(frame.args.ifexists), namespace = frame.args.namespace or args.namespace, selfref = yesno(frame.args.selfref or args.selfref), template = template } return p._labelledList(pages, labels, options) end function p._labelledList (pages, labels, options) if options.ifexists then for k = #pages, 1, -1 do --iterate backwards to allow smooth removals local v = pages[k] local title = mw.title.new(getTarget(v), namespace) if (v == '') or title == nil or not title.exists then table.remove(pages, k) end end end labels = labels or {} label = (#pages == 1 and labels[1] or labels[2]) or defaults.label for k, v in pairs(pages) do if mHatnote.findNamespaceId(v) ~= 0 then label = ( #pages == 1 and (labels[3] or labels[1] or defaults.label) or (labels[4] or labels[2] or defaults.label) ) or defaults.label end end if #pages == 0 then if options.ifexists then mw.addWarning( string.format( msg.noOutputWarning, options.template or defaults.template ) ) return '' else return mHatnote.makeWikitextError( msg.noInputWarning, (options.template or defaults.template) .. msg.errorSuffix, options.category ) end end local text = string.format( options.labelForm or defaults.labelForm, label, mHatlist.andList(pages, true) ) local hnOptions = { extraclasses = options.extraclasses, selfref = options.selfref } return mHatnote._hatnote(text, hnOptions) end return p b7a8ba27cf6195e6427701b94e8d2acad3c40a21 Template:Clear 10 25 47 2022-06-13T15:31:11Z wikipedia>Xaosflux 0 Changed protection settings for "[[Template:Clear]]": [[WP:High-risk templates|Highly visible template]]: 3MM+ uses ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude> 38bab3e3d7fbd3d6800d46556e60bc6bac494d72 Module:Uses TemplateStyles/config 828 221 553 2022-06-16T15:10:06Z wikipedia>Pppery 0 Matching reality rather than 2018 me's wishful thinking Scribunto text/plain local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpage_blacklist'] = { ['doc'] = true, ['sandbox'] = true, ['sandbox2'] = true, ['testcases'] = true, } -- Sandbox title: if the stylesheet’s title is <template>/<stylesheet>.css, the -- stylesheet’s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css -- Set to nil to disable sandbox links. cfg['sandbox_title'] = 'sandbox' -- Error category: this category is added if the module call contains errors -- (e.g. no stylesheet listed). A category name without namespace, or nil -- to disable categorization (not recommended). cfg['error_category'] = 'Uses TemplateStyles templates with errors' -- Default category: this category is added if no custom category is specified -- in module/template call. A category name without namespace, or nil -- to disable categorization. cfg['default_category'] = 'Templates using TemplateStyles' -- Protection conflict category: this category is added if the protection level -- of any stylesheet is lower than the protection level of the template. A category name -- without namespace, or nil to disable categorization (not recommended). cfg['protection_conflict_category'] = 'Templates using TemplateStyles with a different protection level' -- Hierarchy of protection levels, used to determine whether one protection level is lower -- than another and thus should populate protection_conflict_category. No protection is treated as zero cfg['protection_hierarchy'] = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } -- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil -- to disable padlock check. cfg['padlock_pattern'] = '{{pp-' -- Missing padlock category: this category is added if a protected stylesheet -- doesn’t contain any padlock template (specified by the above Lua pattern). -- A category name without namespace (no nil allowed) if the pattern is not nil, -- unused (and thus may be nil) otherwise. cfg['missing_padlock_category'] = 'Templates using TemplateStyles without padlocks' return cfg -- Don’t touch this line. 58e7a37c44f6ea3f6b8af54a559d696cc7256493 Module:Uses TemplateStyles 828 220 551 2022-06-16T15:13:38Z wikipedia>Pppery 0 Matching reality rather than 2018 me's wishful thinking Scribunto text/plain local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg, ...) return TNT.format('I18n/Uses TemplateStyles', msg, ...) end local function getConfig() return mw.loadData('Module:Uses TemplateStyles/config') end local function renderBox(tStyles) local boxArgs = { type = 'notice', small = true, image = string.format('[[File:Farm-Fresh css add.svg|32px|alt=%s]]', format('logo-alt')) } if #tStyles < 1 then boxArgs.text = string.format('<strong class="error">%s</strong>', format('error-emptylist')) else local cfg = getConfig() local tStylesLinks = {} for i, ts in ipairs(tStyles) do local link = string.format('[[:%s]]', ts) local sandboxLink = nil local tsTitle = mw.title.new(ts) if tsTitle and cfg['sandbox_title'] then local tsSandboxTitle = mw.title.new(string.format( '%s:%s/%s/%s', tsTitle.nsText, tsTitle.baseText, cfg['sandbox_title'], tsTitle.subpageText)) if tsSandboxTitle and tsSandboxTitle.exists then sandboxLink = format('sandboxlink', link, ':' .. tsSandboxTitle.prefixedText) end end tStylesLinks[i] = sandboxLink or link end local tStylesList = mList.makeList('bulleted', tStylesLinks) boxArgs.text = format( mw.title.getCurrentTitle():inNamespaces(828,829) and 'header-module' or 'header-template') .. '\n' .. tStylesList end return mMessageBox.main('mbox', boxArgs) end local function renderTrackingCategories(args, tStyles, titleObj) if yesno(args.nocat) then return '' end local cfg = getConfig() local cats = {} -- Error category if #tStyles < 1 and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- TemplateStyles category titleObj = titleObj or mw.title.getCurrentTitle() if (titleObj.namespace == 10 or titleObj.namespace == 828) and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category or cfg['default_category'] if category then cats[#cats + 1] = category end if not yesno(args.noprotcat) and (cfg['protection_conflict_category'] or cfg['padlock_pattern']) then local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil local addedLevelCat = false local addedPadlockCat = false for i, ts in ipairs(tStyles) do local tsTitleObj = mw.title.new(ts) local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then local content = tsTitleObj:getContent() if not content:find(cfg['padlock_pattern']) then cats[#cats + 1] = cfg['missing_padlock_category'] addedPadlockCat = true end end if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then currentProt = cfg['protection_hierarchy'][currentProt] or 0 tsProt = cfg['protection_hierarchy'][tsProt] or 0 if tsProt < currentProt then addedLevelCat = true cats[#cats + 1] = cfg['protection_conflict_category'] end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end function p._main(args, cfg) local tStyles = mTableTools.compressSparseArray(args) local box = renderBox(tStyles) local trackingCategories = renderTrackingCategories(args, tStyles) return box .. trackingCategories end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 71ca57c37849f38e3c5ee30061bdae730963e48e Template:Flowlist 10 206 521 2022-07-06T18:59:15Z 5.43.73.144 0 Undid revision 1096805456 by [[Special:Contributions/5.43.73.144|5.43.73.144]] ([[User talk:5.43.73.144|talk]]) wikitext text/x-wiki <templatestyles src="Flowlist/styles.css" /><div class="flowlist {{{class|}}}" {{#if: {{{style|}}}|style="{{{style}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> 8fab8f03d7353b9e7ebe1b375ebbfc6801f60bdb Module:Message box/ombox.css 828 72 141 2022-07-11T18:40:17Z wikipedia>Izno 0 and move mbox-small to 720px here as well text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 187 141 2022-11-09T19:51:31Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:Message_box/ombox.css]]: Importing from [[w:|English Wikipedia]] to sync templates sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Template:Para 10 48 93 2022-07-22T08:06:17Z wikipedia>TheDJ 0 breakup super long words, so we do not overflow the viewport. wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 06006deea2ed5d552aab61b4332321ab749ae7e8 Module:Format TemplateData/config 828 232 575 2022-08-01T17:59:53Z wikipedia>MusikBot II 0 Protected "[[Module:Format TemplateData/config]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 515 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) Scribunto text/plain local Serial = "2022-03-20" --[=[ enwiki configuration {{TemplateData}} mw.loadData() ]=] return { catProblem = false, classMultiColumns = "column-multiple", classNoNumTOC = "nonumtoc", classTable = { "wikitable", "templatedata-params" }, cssParams = { ["border"] = "#B3B7FF 1px solid" }, docpageCreate = "%s/doc", docpageDetect = "/doc", helpBoolean = false, helpContent = false, helpDate = false, helpFile = false, helpFormat = false, helpLine = false, helpNumber = false, helpPage = false, helpString = false, helpTemplate = false, helpURL = false, helpUser = false, msgDescMiss = "missing <code>description</code>", permit = { boole = { [true] = { css = { ["color"] = "#050", ["font-weight"] = "bold" }, lead = false, show = "True" }, [false] = { css = { ["color"] = "#610", ["font-weight"] = "bold" }, lead = false, show = "False" } }, css = { tableheadbg = { ["background-color"] = "#B3B7FF" }, bg = { ["bg"] = "none" }, required = { ["border-left"] = "3px solid black" }, suggested = { ["border-left"] = "3px solid #888" }, optional = { ["border-left"] = "3px solid #CCC" }, deprecated = { ["background-color"] = "#FDD", ["border-left"] = "3px dotted red" } } }, tStylesTOCnum = "TOC nonum", tStylesMultiColumns = "column-multiple", serial = Serial } ce8c2e3e08b7c06d862b014b7affdebda341027a Module:Multilingual 828 233 577 2022-08-09T00:07:40Z wikipedia>Sdrqaz 0 Protected "[[Module:Multilingual]]": [[WP:High-risk templates|High-risk Lua module]]: [[Special:Diff/1103230387/1103232518|Requested by Pppery at RfPP]]. Used in [[Module:Format TemplateData]], which is semi-protected and has 516 transclusions ([Edit=Require autoconfirmed or confirmed access] (indefinite)) Scribunto text/plain local Multilingual = { suite = "Multilingual", serial = "2020-12-10", item = 47541920, globals = { ISO15924 = 71584769, WLink = 19363224 } } --[=[ Utilities for multilingual texts and ISO 639 (BCP47) issues etc. * fair() * fallback() * findCode() * fix() * format() * getBase() * getLang() * getName() * i18n() * int() * isLang() * isLangWiki() * isMinusculable() * isRTL() * message() * sitelink() * tabData() * userLang() * userLangCode() * wikibase() * failsafe() loadData: Multilingual/config Multilingual/names ]=] local Failsafe = Multilingual local GlobalMod = Multilingual local GlobalData = Multilingual local User = { sniffer = "showpreview" } Multilingual.globals.Multilingual = Multilingual.item Multilingual.exotic = { simple = true, no = true } Multilingual.prefer = { cs = true, de = true, en = true, es = true, fr = true, it = true, nl = true, pt = true, ru = true, sv = true } local foreignModule = function ( access, advanced, append, alt, alert ) -- Fetch global module -- Precondition: -- access -- string, with name of base module -- advanced -- true, for require(); else mw.loadData() -- append -- string, with subpage part, if any; or false -- alt -- number, of wikidata item of root; or false -- alert -- true, for throwing error on data problem -- Postcondition: -- Returns whatever, probably table -- 2020-01-01 local storage = access local finer = function () if append then storage = string.format( "%s/%s", storage, append ) end end local fun, lucky, r, suited if advanced then fun = require else fun = mw.loadData end GlobalMod.globalModules = GlobalMod.globalModules or { } suited = GlobalMod.globalModules[ access ] if not suited then finer() lucky, r = pcall( fun, "Module:" .. storage ) end if not lucky then if not suited and type( alt ) == "number" and alt > 0 then suited = string.format( "Q%d", alt ) suited = mw.wikibase.getSitelink( suited ) GlobalMod.globalModules[ access ] = suited or true end if type( suited ) == "string" then storage = suited finer() lucky, r = pcall( fun, storage ) end if not lucky and alert then error( "Missing or invalid page: " .. storage ) end end return r end -- foreignModule() local fetchData = function ( access ) -- Retrieve translated keyword from commons:Data:****.tab -- Precondition: -- access -- string, with page identification on Commons -- Returns table, with data, or string, with error message -- 2019-12-05 local storage = access local r if type( storage ) == "string" then local s storage = mw.text.trim( storage ) s = storage:lower() if s:sub( 1, 2 ) == "c:" then storage = mw.text.trim( storage:sub( 3 ) ) s = storage:lower() elseif s:sub( 1, 8 ) == "commons:" then storage = mw.text.trim( storage:sub( 9 ) ) s = storage:lower() end if s:sub( 1, 5 ) == "data:" then storage = mw.text.trim( storage:sub( 6 ) ) s = storage:lower() end if s == "" or s == ".tab" then storage = false elseif s:sub( -4 ) == ".tab" then storage = storage:sub( 1, -5 ) .. ".tab" else storage = storage .. ".tab" end end if type( storage ) == "string" then local data if type( GlobalData.TabDATA ) ~= "table" then GlobalData.TabDATA = { } end data = GlobalData.TabDATA[ storage ] if data then r = data else local lucky lucky, data = pcall( mw.ext.data.get, storage, "_" ) if type( data ) == "table" then data = data.data if type( data ) == "table" then GlobalData.TabDATA[ storage ] = data else r = string.format( "%s [[%s%s]]", "INVALID Data:*.tab", "commons:Data:", storage ) end else r = "BAD PAGE Data:*.tab &#8211; commons:" .. storage end if r then GlobalData.TabDATA[ storage ] = r data = false else r = data end end else r = "BAD PAGE commons:Data:*.tab" end return r end -- fetchData() local favorites = function () -- Provide fallback codes -- Postcondition: -- Returns table with sequence of preferred languages -- * ahead elements -- * user (not yet accessible) -- * page content language (not yet accessible) -- * page name subpage -- * project -- * en local r = Multilingual.polyglott if not r then local self = mw.language.getContentLanguage():getCode():lower() local sub = mw.title.getCurrentTitle().subpageText local f = function ( add ) local s = add for i = 1, #r do if r[ i ] == s then s = false break -- for i end end -- for i if s then table.insert( r, s ) end end r = { } if sub:find( "/", 2, true ) then sub = sub:match( "/(%l%l%l?)$" ) if sub then table.insert( r, sub ) end elseif sub:find( "^%l%l%l?%-?%a?%a?%a?%a?$" ) and mw.language.isSupportedLanguage( sub ) then table.insert( r, sub ) end f( self ) f( "en" ) Multilingual.polyglott = r end return r end -- favorites() local feasible = function ( ask, accept ) -- Is ask to be supported by application? -- Precondition: -- ask -- lowercase code -- accept -- sequence table, with offered lowercase codes -- Postcondition: -- nil, or true local r for i = 1, #accept do if accept[ i ] == ask then r = true break -- for i end end -- for i return r end -- feasible() local fetch = function ( access, append ) -- Attach config or library module -- Precondition: -- access -- module title -- append -- string, with subpage part of this; or false -- Postcondition: -- Returns: table, with library, or false local got, sign if append then sign = string.format( "%s/%s", access, append ) else sign = access end if type( Multilingual.ext ) ~= "table" then Multilingual.ext = { } end got = Multilingual.ext[ sign ] if not got and got ~= false then local global = Multilingual.globals[ access ] local lib = ( not append or append == "config" ) got = foreignModule( access, lib, append, global ) if type( got ) == "table" then if lib then local startup = got[ access ] if type( startup ) == "function" then got = startup() end end else got = false end Multilingual.ext[ sign ] = got end return got end -- fetch() local fetchISO639 = function ( access ) -- Retrieve table from commons:Data:ISO639/***.tab -- Precondition: -- access -- string, with subpage identification -- Postcondition: -- Returns table, with data, even empty local r if type( Multilingual.iso639 ) ~= "table" then Multilingual.iso639 = { } end r = Multilingual.iso639[ access ] if type( r ) == "nil" then local raw = fetchData( "ISO639/" .. access ) if type( raw ) == "table" then local t r = { } for i = 1, #raw do t = raw[ i ] if type( t ) == "table" and type( t[ 1 ] ) == "string" and type( t[ 2 ] ) == "string" then r[ t[ 1 ] ] = t[ 2 ] else break -- for i end end -- for i else r = false end Multilingual.iso639[ access ] = r end return r or { } end -- fetchISO639() local fill = function ( access, alien, frame ) -- Expand language name template -- Precondition: -- access -- string, with language code -- alien -- language code for which to be generated -- frame -- frame, if available -- Postcondition: -- Returns string local template = Multilingual.tmplLang local r if type( template ) ~= "table" then local cnf = fetch( "Multilingual", "config" ) if cnf then template = cnf.tmplLang end end if type( template ) == "table" then local source = template.title local f, lucky, s Multilingual.tmplLang = template if type( source ) ~= "string" and type( template.namePat ) == "string" and template.namePat:find( "%s", 1, true ) then source = string.format( template.namePat, access ) end if type( source ) == "string" then if not Multilingual.frame then if frame then Multilingual.frame = frame else Multilingual.frame = mw.getCurrentFrame() end end f = function ( a ) return Multilingual.frame:expandTemplate{ title = a } end lucky, s = pcall( f, source ) if lucky then r = s end end end return r end -- fill() local find = function ( ask, alien ) -- Derive language code from name -- Precondition: -- ask -- language name, downcased -- alien -- language code of ask -- Postcondition: -- nil, or string local codes = mw.language.fetchLanguageNames( alien, "all" ) local r for k, v in pairs( codes ) do if mw.ustring.lower( v ) == ask then r = k break -- for k, v end end -- for k, v if not r then r = Multilingual.fair( ask ) end return r end -- find() local fold = function ( frame ) -- Merge template and #invoke arglist -- Precondition: -- frame -- template frame -- Postcondition: -- table, with combined arglist local r = { } local f = function ( apply ) if type( apply ) == "table" and type( apply.args ) == "table" then for k, v in pairs( apply.args ) do v = mw.text.trim( v ) if v ~= "" then r[ tostring( k ) ] = v end end -- for k, v end end -- f() f( frame:getParent() ) f( frame ) return r end -- fold() User.favorize = function ( accept, frame ) -- Guess user language -- Precondition: -- accept -- sequence table, with offered ISO 639 etc. codes -- frame -- frame, if available -- Postcondition: -- Returns string with best code, or nil if not ( User.self or User.langs ) then if not User.trials then User.tell = mw.message.new( User.sniffer ) if User.tell:exists() then User.trials = { } if not Multilingual.frame then if frame then Multilingual.frame = frame else Multilingual.frame = mw.getCurrentFrame() end end User.sin = Multilingual.frame:callParserFunction( "int", User.sniffer ) else User.langs = true end end if User.sin then local order = { } local post = { } local three = { } local unfold = { } local s, sin for i = 1, #accept do s = accept[ i ] if not User.trials[ s ] then if #s > 2 then if s:find( "-", 3, true ) then table.insert( unfold, s ) else table.insert( three, s ) end else if Multilingual.prefer[ s ] then table.insert( order, s ) else table.insert( post, s ) end end end end -- for i for i = 1, #post do table.insert( order, post[ i ] ) end -- for i for i = 1, #three do table.insert( order, three[ i ] ) end -- for i for i = 1, #unfold do table.insert( order, unfold[ i ] ) end -- for i for i = 1, #order do s = order[ i ] sin = User.tell:inLanguage( s ):plain() if sin == User.sin then User.self = s break -- for i else User.trials[ s ] = true end end -- for i end end return User.self end -- User.favorize() Multilingual.fair = function ( ask ) -- Format language specification according to RFC 5646 etc. -- Precondition: -- ask -- string or table, as created by .getLang() -- Postcondition: -- Returns string, or false local s = type( ask ) local q, r if s == "table" then q = ask elseif s == "string" then q = Multilingual.getLang( ask ) end if q and q.legal and mw.language.isKnownLanguageTag( q.base ) then r = q.base if q.n > 1 then local order = { "extlang", "script", "region", "other", "extension" } for i = 1, #order do s = q[ order[ i ] ] if s then r = string.format( "%s-%s", r, s ) end end -- for i end end return r or false end -- Multilingual.fair() Multilingual.fallback = function ( able, another ) -- Is another language suitable as replacement? -- Precondition: -- able -- language version specifier to be supported -- another -- language specifier of a possible replacement, -- or not to retrieve a fallback table -- Postcondition: -- Returns boolean, or table with fallback codes local r if type( able ) == "string" and #able > 0 then if type( another ) == "string" and #another > 0 then if able == another then r = true else local s = Multilingual.getBase( able ) if s == another then r = true else local others = mw.language.getFallbacksFor( s ) r = feasible( another, others ) end end else local s = Multilingual.getBase( able ) if s then r = mw.language.getFallbacksFor( s ) if r[ 1 ] == "en" then local d = fetchISO639( "fallback" ) if type( d ) == "table" and type( d[ s ] ) == "string" then r = mw.text.split( d[ s ], "|" ) table.insert( r, "en" ) end end end end end return r or false end -- Multilingual.fallback() Multilingual.findCode = function ( ask ) -- Retrieve code of local (current project or English) language name -- Precondition: -- ask -- string, with presumable language name -- A code itself will be identified, too. -- Postcondition: -- Returns string, or false local seek = mw.text.trim( ask ) local r = false if #seek > 1 then if seek:find( "[", 1, true ) then local wlink = fetch( "WLink" ) if wlink and type( wlink.getPlain ) == "function" then seek = wlink.getPlain( seek ) end end seek = mw.ustring.lower( seek ) if Multilingual.isLang( seek ) then r = Multilingual.fair( seek ) else local collection = favorites() for i = 1, #collection do r = find( seek, collection[ i ] ) if r then break -- for i end end -- for i end end return r end -- Multilingual.findCode() Multilingual.fix = function ( attempt ) -- Fix frequently mistaken language code -- Precondition: -- attempt -- string, with presumable language code -- Postcondition: -- Returns string with correction, or false if no problem known local r = fetchISO639( "correction" )[ attempt:lower() ] return r or false end -- Multilingual.fix() Multilingual.format = function ( apply, alien, alter, active, alert, frame, assembly, adjacent, ahead ) -- Format one or more languages -- Precondition: -- apply -- string with language list or item -- alien -- language of the answer -- -- nil, false, "*": native -- -- "!": current project -- -- "#": code, downcased, space separated -- -- "-": code, mixcase, space separated -- -- any valid code -- alter -- capitalize, if "c"; downcase all, if "d" -- capitalize first item only, if "f" -- downcase every first word only, if "m" -- active -- link items, if true -- alert -- string with category title in case of error -- frame -- if available -- assembly -- string with split pattern, if list expected -- adjacent -- string with list separator, else assembly -- ahead -- string to prepend first element, if any -- Postcondition: -- Returns string, or false if apply empty local r = false if apply then local slang if assembly then local bucket = mw.text.split( apply, assembly ) local shift = alter local separator if adjacent then separator = adjacent elseif alien == "#" or alien == "-" then separator = " " else separator = assembly end for k, v in pairs( bucket ) do slang = Multilingual.format( v, alien, shift, active, alert ) if slang then if r then r = string.format( "%s%s%s", r, separator, slang ) else r = slang if shift == "f" then shift = "d" end end end end -- for k, v if r and ahead then r = ahead .. r end else local single = mw.text.trim( apply ) if single == "" then r = false else local lapsus, slot slang = Multilingual.findCode( single ) if slang then if alien == "-" then r = slang elseif alien == "#" then r = slang:lower() else r = Multilingual.getName( slang, alien ) if active then slot = fill( slang, false, frame ) if slot then local wlink = fetch( "WLink" ) if wlink and type( wlink.getTarget ) == "function" then slot = wlink.getTarget( slot ) end else lapsus = alert end end end else r = single if active then local title = mw.title.makeTitle( 0, single ) if title.exists then slot = single end end lapsus = alert end if not r then r = single elseif alter == "c" or alter == "f" then r = mw.ustring.upper( mw.ustring.sub( r, 1, 1 ) ) .. mw.ustring.sub( r, 2 ) elseif alter == "d" then if Multilingual.isMinusculable( slang, r ) then r = mw.ustring.lower( r ) end elseif alter == "m" then if Multilingual.isMinusculable( slang, r ) then r = mw.ustring.lower( mw.ustring.sub( r, 1, 1 ) ) .. mw.ustring.sub( r, 2 ) end end if slot then if r == slot then r = string.format( "[[%s]]", r ) else r = string.format( "[[%s|%s]]", slot, r ) end end if lapsus and alert then r = string.format( "%s[[Category:%s]]", r, alert ) end end end end return r end -- Multilingual.format() Multilingual.getBase = function ( ask ) -- Retrieve base language from possibly combined ISO language code -- Precondition: -- ask -- language code -- Postcondition: -- Returns string, or false local r if ask then local slang = ask:match( "^%s*(%a%a%a?)-?%a*%s*$" ) if slang then r = slang:lower() else r = false end else r = false end return r end -- Multilingual.getBase() Multilingual.getLang = function ( ask ) -- Retrieve components of a RFC 5646 language code -- Precondition: -- ask -- language code with subtags -- Postcondition: -- Returns table with formatted subtags -- .base -- .region -- .script -- .suggest -- .year -- .extension -- .other -- .n local tags = mw.text.split( ask, "-" ) local s = tags[ 1 ] local r if s:match( "^%a%a%a?$" ) then r = { base = s:lower(), legal = true, n = #tags } for i = 2, r.n do s = tags[ i ] if #s == 2 then if r.region or not s:match( "%a%a" ) then r.legal = false else r.region = s:upper() end elseif #s == 4 then if s:match( "%a%a%a%a" ) then r.legal = ( not r.script ) r.script = s:sub( 1, 1 ):upper() .. s:sub( 2 ):lower() elseif s:match( "20%d%d" ) or s:match( "1%d%d%d" ) then r.legal = ( not r.year ) r.year = s else r.legal = false end elseif #s == 3 then if r.extlang or not s:match( "%a%a%a" ) then r.legal = false else r.extlang = s:lower() end elseif #s == 1 then s = s:lower() if s:match( "[tux]" ) then r.extension = s for k = i + 1, r.n do s = tags[ k ] if s:match( "^%w+$" ) then r.extension = string.format( "%s-%s", r.extension, s ) else r.legal = false end end -- for k else r.legal = false end break -- for i else r.legal = ( not r.other ) and s:match( "%a%a%a" ) r.other = s:lower() end if not r.legal then break -- for i end end -- for i if r.legal then r.suggest = Multilingual.fix( r.base ) if r.suggest then r.legal = false end end else r = { legal = false } end if not r.legal then local cnf = fetch( "Multilingual", "config" ) if cnf and type( cnf.scream ) == "string" then r.scream = cnf.scream end end return r end -- Multilingual.getLang() Multilingual.getName = function ( ask, alien ) -- Which name is assigned to this language code? -- Precondition: -- ask -- language code -- alien -- language of the answer -- -- nil, false, "*": native -- -- "!": current project -- -- any valid code -- Postcondition: -- Returns string, or false local r if ask then local slang = alien local tLang if slang then if slang == "*" then slang = Multilingual.fair( ask ) elseif slang == "!" then slang = favorites()[ 1 ] else slang = Multilingual.fair( slang ) end else slang = Multilingual.fair( ask ) end if not slang then slang = ask or "?????" end slang = slang:lower() tLang = fetch( "Multilingual", "names" ) if tLang then tLang = tLang[ slang ] if tLang then r = tLang[ ask ] end end if not r then if not Multilingual.ext.tMW then Multilingual.ext.tMW = { } end tLang = Multilingual.ext.tMW[ slang ] if tLang == nil then tLang = mw.language.fetchLanguageNames( slang ) if tLang then Multilingual.ext.tMW[ slang ] = tLang else Multilingual.ext.tMW[ slang ] = false end end if tLang then r = tLang[ ask ] end end if not r then r = mw.language.fetchLanguageName( ask:lower(), slang ) if r == "" then r = false end end else r = false end return r end -- Multilingual.getName() Multilingual.i18n = function ( available, alt, frame ) -- Select translatable message -- Precondition: -- available -- table, with mapping language code ./. text -- alt -- string|nil|false, with fallback text -- frame -- frame, if available -- Returns -- 1. string|nil|false, with selected message -- 2. string|nil|false, with language code local r1, r2 if type( available ) == "table" then local codes = { } local trsl = { } local slang for k, v in pairs( available ) do if type( k ) == "string" and type( v ) == "string" then slang = mw.text.trim( k:lower() ) table.insert( codes, slang ) trsl[ slang ] = v end end -- for k, v slang = Multilingual.userLang( codes, frame ) if slang and trsl[ slang ] then r1 = mw.text.trim( trsl[ slang ] ) if r1 == "" then r1 = false else r2 = slang end end end if not r1 and type( alt ) == "string" then r1 = mw.text.trim( alt ) if r1 == "" then r1 = false end end return r1, r2 end -- Multilingual.i18n() Multilingual.int = function ( access, alien, apply ) -- Translated system message -- Precondition: -- access -- message ID -- alien -- language code -- apply -- nil, or sequence table with parameters $1, $2, ... -- Postcondition: -- Returns string, or false local o = mw.message.new( access ) local r if o:exists() then if type( alien ) == "string" then o:inLanguage( alien:lower() ) end if type( apply ) == "table" then o:params( apply ) end r = o:plain() end return r or false end -- Multilingual.int() Multilingual.isLang = function ( ask, additional ) -- Could this be an ISO language code? -- Precondition: -- ask -- language code -- additional -- true, if Wiki codes like "simple" permitted -- Postcondition: -- Returns boolean local r, s if additional then s = ask else s = Multilingual.getBase( ask ) end if s then r = mw.language.isKnownLanguageTag( s ) if r then r = not Multilingual.fix( s ) elseif additional then r = Multilingual.exotic[ s ] or false end else r = false end return r end -- Multilingual.isLang() Multilingual.isLangWiki = function ( ask ) -- Could this be a Wiki language version? -- Precondition: -- ask -- language version specifier -- Postcondition: -- Returns boolean local r local s = Multilingual.getBase( ask ) if s then r = mw.language.isSupportedLanguage( s ) or Multilingual.exotic[ ask ] else r = false end return r end -- Multilingual.isLangWiki() Multilingual.isMinusculable = function ( ask, assigned ) -- Could this language name become downcased? -- Precondition: -- ask -- language code, or nil -- assigned -- language name, or nil -- Postcondition: -- Returns boolean local r = true if ask then local cnf = fetch( "Multilingual", "config" ) if cnf then local s = string.format( " %s ", ask:lower() ) if type( cnf.stopMinusculization ) == "string" and cnf.stopMinusculization:find( s, 1, true ) then r = false end if r and assigned and type( cnf.seekMinusculization ) == "string" and cnf.seekMinusculization:find( s, 1, true ) and type( cnf.scanMinusculization ) == "string" then local scan = assigned:gsub( "[%(%)]", " " ) .. " " if not scan:find( cnf.scanMinusculization ) then r = false end end end end return r end -- Multilingual.isMinusculable() Multilingual.isRTL = function ( ask ) -- Check whether language is written right-to-left -- Precondition: -- ask -- string, with language (or script) code -- Returns true, if right-to-left local r Multilingual.rtl = Multilingual.rtl or { } r = Multilingual.rtl[ ask ] if type( r ) ~= "boolean" then local bib = fetch( "ISO15924" ) if type( bib ) == "table" and type( bib.isRTL ) == "function" then r = bib.isRTL( ask ) else r = mw.language.new( ask ):isRTL() end Multilingual.rtl[ ask ] = r end return r end -- Multilingual.isRTL() Multilingual.message = function ( arglist, frame ) -- Show text in best match of user language like system message -- Precondition: -- arglist -- template arguments -- frame -- frame, if available -- Postcondition: -- Returns string with appropriate text local r if type( arglist ) == "table" then local t = { } local m, p, save for k, v in pairs( arglist ) do if type( k ) == "string" and type( v ) == "string" then v = mw.text.trim( v ) if v ~= "" then if k:match( "^%l%l" ) then t[ k ] = v elseif k:match( "^%$%d$" ) and k ~= "$0" then p = p or { } k = tonumber( k:match( "^%$(%d)$" ) ) p[ k ] = v if not m or k > m then m = k end end end end end -- for k, v if type( arglist[ "-" ] ) == "string" then save = arglist[ arglist[ "-" ] ] end r = Multilingual.i18n( t, save, frame ) if p and r and r:find( "$", 1, true ) then t = { } for i = 1, m do t[ i ] = p[ i ] or "" end -- for i r = mw.message.newRawMessage( r, t ):plain() end end return r or "" end -- Multilingual.message() Multilingual.sitelink = function ( all, frame ) -- Make link at local or other site with optimal linktext translation -- Precondition: -- all -- string or table or number, item ID or entity -- frame -- frame, if available -- Postcondition: -- Returns string with any helpful internal link, or plain text local s = type( all ) local object, r if s == "table" then object = all elseif s == "string" then object = mw.wikibase.getEntity( all ) elseif s == "number" then object = mw.wikibase.getEntity( string.format( "Q%d", all ) ) end if type( object ) == "table" then local collection = object.sitelinks local entry s = false if type( collection ) == "table" then Multilingual.site = Multilingual.site or mw.wikibase.getGlobalSiteId() entry = collection[ Multilingual.site ] if entry then s = ":" .. entry.title elseif collection.enwiki then s = "w:en:" .. collection.enwiki.title end end r = Multilingual.wikibase( object, "labels", frame ) if s then if s == ":" .. r then r = string.format( "[[%s]]", s ) else r = string.format( "[[%s|%s]]", s, r ) end end end return r or "" end -- Multilingual.sitelink() Multilingual.tabData = function ( access, at, alt, frame ) -- Retrieve translated keyword from commons:Data:****.tab -- Precondition: -- access -- string, with page identification on Commons -- at -- string, with keyword -- alt -- string|nil|false, with fallback text -- frame -- frame, if available -- Returns -- 1. string|nil|false, with selected message -- 2. language code, or "error" local data = fetchData( access ) local r1, r2 if type( data ) == "table" then if type( at ) == "string" then local seek = mw.text.trim( at ) if seek == "" then r1 = "EMPTY Multilingual.tabData key" else local e, poly for i = 1, #data do e = data[ i ] if type( e ) == "table" then if e[ 1 ] == seek then if type( e[ 2 ] ) == "table" then poly = e[ 2 ] else r1 = "INVALID Multilingual.tabData bad #" .. tostring( i ) end break -- for i end else break -- for i end end -- for i if poly then data = poly else r1 = "UNKNOWN Multilingual.tabData key: " .. seek end end else r1 = "INVALID Multilingual.tabData key" end else r1 = data end if r1 then r2 = "error" elseif data then r1, r2 = Multilingual.i18n( data, alt, frame ) r2 = r2 or "error" end return r1, r2 end -- Multilingual.tabData() Multilingual.userLang = function ( accept, frame ) -- Try to support user language by application -- Precondition: -- accept -- string or table -- space separated list of available ISO 639 codes -- Default: project language, or English -- frame -- frame, if available -- Postcondition: -- Returns string with appropriate code local s = type( accept ) local codes, r, slang if s == "string" then codes = mw.text.split( accept:lower(), "%s+" ) elseif s == "table" then codes = { } for i = 1, #accept do s = accept[ i ] if type( s ) == "string" and s ~= "" then table.insert( codes, s:lower() ) end end -- for i end slang = User.favorize( codes, frame ) if slang then if feasible( slang, codes ) then r = slang elseif slang:find( "-", 1, true ) then slang = Multilingual.getBase( slang ) if feasible( slang, codes ) then r = slang end end if not r then local others = mw.language.getFallbacksFor( slang ) for i = 1, #others do slang = others[ i ] if feasible( slang, codes ) then r = slang break -- for i end end -- for i end end if not r then local back = favorites() for i = 1, #back do slang = back[ i ] if feasible( slang, codes ) then r = slang break -- for i end end -- for i if not r and codes[ 1 ] then r = codes[ 1 ] end end return r or favorites()[ 1 ] end -- Multilingual.userLang() Multilingual.userLangCode = function () -- Guess a user language code -- Postcondition: -- Returns code of current best guess return User.self or favorites()[ 1 ] end -- Multilingual.userLangCode() Multilingual.wikibase = function ( all, about, attempt, frame ) -- Optimal translation of wikibase component -- Precondition: -- all -- string or table, object ID or entity -- about -- boolean, true "descriptions" or false "labels" -- attempt -- string or not, code of preferred language -- frame -- frame, if available -- Postcondition: -- Returns -- 1. string, with selected message -- 2. string, with language code, or not local s = type( all ) local object, r, r2 if s == "table" then object = all elseif s == "string" then object = mw.wikibase.getEntity( all ) end if type( object ) == "table" then if about and about ~= "labels" then s = "descriptions" else s = "labels" end object = object[ s ] if type( object ) == "table" then if object[ attempt ] then r = object[ attempt ].value r2 = attempt else local poly for k, v in pairs( object ) do poly = poly or { } poly[ k ] = v.value end -- for k, v if poly then r, r2 = Multilingual.i18n( poly, nil, frame ) end end end end return r or "", r2 end -- Multilingual.wikibase() Failsafe.failsafe = function ( atleast ) -- Retrieve versioning and check for compliance -- Precondition: -- atleast -- string, with required version -- or wikidata|item|~|@ or false -- Postcondition: -- Returns string -- with queried version/item, also if problem -- false -- if appropriate -- 2020-08-17 local since = atleast local last = ( since == "~" ) local linked = ( since == "@" ) local link = ( since == "item" ) local r if last or link or linked or since == "wikidata" then local item = Failsafe.item since = false if type( item ) == "number" and item > 0 then local suited = string.format( "Q%d", item ) if link then r = suited else local entity = mw.wikibase.getEntity( suited ) if type( entity ) == "table" then local seek = Failsafe.serialProperty or "P348" local vsn = entity:formatPropertyValues( seek ) if type( vsn ) == "table" and type( vsn.value ) == "string" and vsn.value ~= "" then if last and vsn.value == Failsafe.serial then r = false elseif linked then if mw.title.getCurrentTitle().prefixedText == mw.wikibase.getSitelink( suited ) then r = false else r = suited end else r = vsn.value end end end end end end if type( r ) == "nil" then if not since or since <= Failsafe.serial then r = Failsafe.serial else r = false end end return r end -- Failsafe.failsafe() -- Export local p = { } p.fair = function ( frame ) -- Format language code -- 1 -- language code local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.fair( s ) or "" end -- p.fair p.fallback = function ( frame ) -- Is another language suitable as replacement? -- 1 -- language version specifier to be supported -- 2 -- language specifier of a possible replacement local s1 = mw.text.trim( frame.args[ 1 ] or "" ) local s2 = mw.text.trim( frame.args[ 2 ] or "" ) local r = Multilingual.fallback( s1, s2 ) if type( r ) == "table" then r = r[ 1 ] else r = r and "1" or "" end return r end -- p.fallback p.findCode = function ( frame ) -- Retrieve language code from language name -- 1 -- name in current project language local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.findCode( s ) or "" end -- p.findCode p.fix = function ( frame ) local r = frame.args[ 1 ] if r then r = Multilingual.fix( mw.text.trim( r ) ) end return r or "" end -- p.fix p.format = function ( frame ) -- Format one or more languages -- 1 -- language list or item -- slang -- language of the answer, if not native -- * -- native -- ! -- current project -- any valid code -- shift -- capitalize, if "c"; downcase, if "d" -- capitalize first item only, if "f" -- link -- 1 -- link items -- scream -- category title in case of error -- split -- split pattern, if list expected -- separator -- list separator, else split -- start -- prepend first element, if any local r local link if frame.args.link == "1" then link = true end r = Multilingual.format( frame.args[ 1 ], frame.args.slang, frame.args.shift, link, frame.args.scream, frame, frame.args.split, frame.args.separator, frame.args.start ) return r or "" end -- p.format p.getBase = function ( frame ) -- Retrieve base language from possibly combined ISO language code -- 1 -- code local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.getBase( s ) or "" end -- p.getBase p.getName = function ( frame ) -- Retrieve language name from ISO language code -- 1 -- code -- 2 -- language to be used for the answer, if not native -- ! -- current project -- * -- native -- any valid code local s = mw.text.trim( frame.args[ 1 ] or "" ) local slang = frame.args[ 2 ] local r Multilingual.frame = frame if slang then slang = mw.text.trim( slang ) end r = Multilingual.getName( s, slang ) return r or "" end -- p.getName p.int = function ( frame ) -- Translated system message -- 1 -- message ID -- lang -- language code -- $1, $2, ... -- parameters local sysMsg = frame.args[ 1 ] local r if sysMsg then sysMsg = mw.text.trim( sysMsg ) if sysMsg ~= "" then local n = 0 local slang = frame.args.lang local i, params, s if slang == "" then slang = false end for k, v in pairs( frame.args ) do if type( k ) == "string" then s = k:match( "^%$(%d+)$" ) if s then i = tonumber( s ) if i > n then n = i end end end end -- for k, v if n > 0 then local s params = { } for i = 1, n do s = frame.args[ "$" .. tostring( i ) ] or "" table.insert( params, s ) end -- for i end r = Multilingual.int( sysMsg, slang, params ) end end return r or "" end -- p.int p.isLang = function ( frame ) -- Could this be an ISO language code? -- 1 -- code local s = mw.text.trim( frame.args[ 1 ] or "" ) local lucky, r = pcall( Multilingual.isLang, s ) return r and "1" or "" end -- p.isLang p.isLangWiki = function ( frame ) -- Could this be a Wiki language version? -- 1 -- code -- Returns non-empty, if possibly language version local s = mw.text.trim( frame.args[ 1 ] or "" ) local lucky, r = pcall( Multilingual.isLangWiki, s ) return r and "1" or "" end -- p.isLangWiki p.isRTL = function ( frame ) -- Check whether language is written right-to-left -- 1 -- string, with language code -- Returns non-empty, if right-to-left local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.isRTL( s ) and "1" or "" end -- p.isRTL() p.message = function ( frame ) -- Translation of text element return Multilingual.message( fold( frame ), frame ) end -- p.message p.sitelink = function ( frame ) -- Make link at local or other site with optimal linktext translation -- 1 -- item ID local s = mw.text.trim( frame.args[ 1 ] or "" ) local r if s:match( "^%d+$") then r = tonumber( s ) elseif s:match( "^Q%d+$") then r = s end if r then r = Multilingual.sitelink( r, frame ) end return r or s end -- p.sitelink p.tabData = function ( frame ) -- Retrieve best message text from Commons Data -- 1 -- page identification on Commons -- 2 -- keyword -- alt -- fallback text local suite = frame.args[ 1 ] local seek = frame.args[ 2 ] local salt = frame.args.alt local r = Multilingual.tabData( suite, seek, salt, frame ) return r end -- p.tabData p.userLang = function ( frame ) -- Which language does the current user prefer? -- 1 -- space separated list of available ISO 639 codes local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.userLang( s, frame ) end -- p.userLang p.wikibase = function ( frame ) -- Optimal translation of wikibase component -- 1 -- object ID -- 2 -- 1 for "descriptions", 0 for "labels". -- or either "descriptions" or "labels" local r local s = mw.text.trim( frame.args[ 1 ] or "" ) if s ~= "" then local s2 = mw.text.trim( frame.args[ 2 ] or "0" ) local slang = mw.text.trim( frame.args.lang or "" ) local large = ( s2 ~= "" and s2 ~= "0" ) if slang == "" then slang = false end r = Multilingual.wikibase( s, large, slang, frame ) end return r or "" end -- p.wikibase p.failsafe = function ( frame ) -- Versioning interface local s = type( frame ) local since if s == "table" then since = frame.args[ 1 ] elseif s == "string" then since = frame end if since then since = mw.text.trim( since ) if since == "" then since = false end end return Failsafe.failsafe( since ) or "" end -- p.failsafe() p.Multilingual = function () return Multilingual end -- p.Multilingual return p 6fc38809302c05872fef2c1602e2d4a3be5143ec Module:Hatnote 828 33 63 2022-09-05T18:18:32Z wikipedia>Nihiltres 0 Reordered helper functions (first by export status, then alphabetically) and migrated p.quote upstream from [[Module:Redirect hatnote]] (includes contributions by Tamzin and Nihiltres) Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 Module:Format link 828 32 61 2022-10-04T13:37:11Z wikipedia>Pppery 0 Avoid Lua erroring when we run out of expensive parser function calls Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f Module:Protection banner 828 39 75 2022-10-21T08:07:11Z wikipedia>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Delink 828 178 463 2022-10-21T09:52:18Z wikipedia>WOSlinker 0 use require("strict") instead of require("Module:No globals") Scribunto text/plain -- This module de-links most wikitext. require("strict") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return s end return s:match("%[%[|(.*)%]%]") end local function delinkPipeTrick(s) -- We need to deal with colons, brackets, and commas, per [[Help:Pipe trick]]. -- First, remove the text before the first colon, if any. if s:match(":") then s = s:match("%[%[.-:(.*)|%]%]") -- If there are no colons, grab all of the text apart from the square brackets and the pipe. else s = s:match("%[%[(.*)|%]%]") end -- Next up, brackets and commas. if s:match("%(.-%)$") then -- Brackets trump commas. s = s:match("(.-) ?%(.-%)$") elseif s:match(",") then -- If there are no brackets, display only the text before the first comma. s = s:match("(.-),.*$") end return s end -- Return wikilink target |wikilinks=target local function getDelinkedTarget(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end return target_area end local function getDelinkedLabel(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end -- Check for categories, interwikis, and files. local colon_prefix = result:match("%[%[(.-):.*%]%]") or "" -- Get the text before the first colon. local ns = mw.site.namespaces[colon_prefix] -- see if this is a known namespace if mw.language.isKnownLanguageTag(colon_prefix) or (ns and (ns.canonicalName == "File" or ns.canonicalName == "Category")) then return "" end -- Remove the colon if the link is using the [[Help:Colon trick]]. if result:match("%[%[:") then result = "[[" .. result:match("%[%[:(.*%]%])") end -- Deal with links using the [[Help:Pipe trick]]. if mw.ustring.match(result, "^%[%[[^|]*|%]%]") then return delinkPipeTrick(result) end -- Find the display area of the wikilink if result:match("|") then -- Find if we're dealing with a piped link. result = result:match("^%[%[.-|(.+)%]%]") -- Remove new lines from the display of multiline piped links, -- where the pipe is before the first new line. result = result:gsub("\n", "") else result = result:match("^%[%[(.-)%]%]") end return result end local function delinkURL(s) -- Assume we have already delinked internal wikilinks, and that -- we have been passed some text between two square brackets [foo]. -- If the text contains a line break it is not formatted as a URL, regardless of other content. if s:match("\n") then return s end -- Check if the text has a valid URL prefix and at least one valid URL character. local valid_url_prefixes = {"//", "http://", "https://", "ftp://", "gopher://", "mailto:", "news:", "irc://"} local url_prefix for _ ,v in ipairs(valid_url_prefixes) do if mw.ustring.match(s, '^%[' .. v ..'[^"%s].*%]' ) then url_prefix = v break end end -- Get display text if not url_prefix then return s end s = s:match("^%[" .. url_prefix .. "(.*)%]") -- Grab all of the text after the URL prefix and before the final square bracket. s = s:match('^.-(["<> ].*)') or "" -- Grab all of the text after the first URL separator character ("<> ). s = mw.ustring.match(s, "^%s*(%S.*)$") or "" -- If the separating character was a space, trim it off. local s_decoded = mw.text.decode(s, true) if mw.ustring.match(s_decoded, "%c") then return s end return s_decoded end local function delinkLinkClass(text, pattern, delinkFunction) if type(text) ~= "string" then error("Attempt to de-link non-string input.", 2) end if type(pattern) ~= "string" or mw.ustring.sub(pattern, 1, 1) ~= "^" then error('Invalid pattern detected. Patterns must begin with "^".', 2) end -- Iterate over the text string, and replace any matched text. using the -- delink function. We need to iterate character by character rather -- than just use gsub, otherwise nested links aren't detected properly. local result = "" while text ~= "" do -- Replace text using one iteration of gsub. text = mw.ustring.gsub(text, pattern, delinkFunction, 1) -- Append the left-most character to the result string. result = result .. mw.ustring.sub(text, 1, 1) text = mw.ustring.sub(text, 2, -1) end return result end function p._delink(args) local text = args[1] or "" if args.refs == "yes" then -- Remove any [[Help:Strip markers]] representing ref tags. In most situations -- this is not a good idea - only use it if you know what you are doing! text = mw.ustring.gsub(text, "UNIQ%w*%-ref%-%d*%-QINU", "") end if args.comments ~= "no" then text = text:gsub("<!%-%-.-%-%->", "") -- Remove html comments. end if args.wikilinks ~= "no" and args.wikilinks ~= "target" then -- De-link wikilinks and return the label portion of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedLabel) elseif args.wikilinks == "target" then -- De-link wikilinks and return the target portions of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedTarget) end if args.urls ~= "no" then text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs. end if args.whitespace ~= "no" then -- Replace single new lines with a single space, but leave double new lines -- and new lines only containing spaces or tabs before a second new line. text = mw.ustring.gsub(text, "([^\n \t][ \t]*)\n([ \t]*[^\n \t])", "%1 %2") text = text:gsub("[ \t]+", " ") -- Remove extra tabs and spaces. end return text end function p.delink(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return p._delink(getArgs(frame, {wrappers = 'Template:Delink'})) end return p 5b8e75ac750b5d3ed76cc4158aefcd1568a6a6fd Module:Template wrapper 828 184 475 2022-10-21T21:11:46Z wikipedia>Legoktm 0 Replace [[Module:No globals]] with require( "strict" ) Scribunto text/plain require('strict'); local error_msg = '<span style=\"font-size:100%\" class=\"error\"><code style=\"color:inherit; border:inherit; padding:inherit;\">&#124;_template=</code> missing or empty</span>'; --[[--------------------------< I S _ I N _ T A B L E >-------------------------------------------------------- scan through tbl looking for value; return true if found, false else ]] local function is_in_table (tbl, value) for k, v in pairs (tbl) do if v == value then return true end end return false; end --[[--------------------------< A D D _ P A R A M E T E R >---------------------------------------------------- adds parameter name and its value to args table according to the state of boolean list argument; kv pair for template execution; k=v string for template listing. ]] local function add_parameter (k, v, args, list) if list then table.insert( args, table.concat ({k, '=', v})); -- write parameter names and values to args table as string else args[k] = v; -- copy parameters to args table end end --[[--------------------------< A L I A S _ M A P _ G E T >---------------------------------------------------- returns a table of local template (parent frame) parameter names and the target template names that match where in [key]=<value> pairs where: [key] is local template parameter name (an alias) <value> is target template parameter name (the canonical parameter name used in the working template) The parameter |_alias-map= has the form: |_alias-map=<list> where <list> is a comma-separated list of alias / canonical parameter name pairs in the form <from> : <to> where: <from> is the local template's parameter name (alias) <to> is the target template's parameter name (canonical) for enumerated parameters place an octothorp (#) where the enumerator digits are placed in the parameter names: <from#> : <to#> ]] local function alias_map_get (_alias_map) local T = mw.text.split (_alias_map, '%s*,%s*'); -- convert the comma-separated list into a table of alias pairs local mapped_aliases = {}; -- mapped aliases will go here local l_name, t_name; -- parameter names for _, alias_pair in ipairs (T) do -- loop through the table of alias pairs l_name, t_name = alias_pair:match ('(.-)%s*:%s*(.+)'); -- from each pair, get local and target parameter names if l_name and t_name then -- if both are set if tonumber (l_name) then l_name = tonumber (l_name); -- convert number-as-text to a number end mapped_aliases[l_name] = t_name; -- add them to the map table end end return mapped_aliases; end --[[--------------------------< F R A M E _ A R G S _ G E T >-------------------------------------------------- Fetch the wrapper template's 'default' and control parameters; adds default parameters to args returns content of |_template= parameter (name of the working template); nil else ]] local function frame_args_get (frame_args, args, list) local template; for k, v in pairs (frame_args) do -- here we get the wrapper template's 'default' parameters if 'string' == type (k) and (v and ('' ~= v)) then -- do not pass along positional or empty parameters if '_template' == k then template = v; -- save the name of template that we are wrapping elseif '_exclude' ~= k and '_reuse' ~= k and '_include-positional' ~= k and '_alias-map' ~= k then -- these already handled so ignore here; add_parameter (k, v, args, list); -- add all other parameters to args in the style dictated by list end end end return template; -- return contents of |_template= parameter end --[=[--------------------------< P F R A M E _ A R G S _ G E T >------------------------------------------------ Fetches the wrapper template's 'live' parameters; adds live parameters that aren't members of the exclude table to args table; positional parameters may not be excluded no return value ]=] local function pframe_args_get (pframe_args, args, exclude, _include_positional, list) for k, v in pairs (pframe_args) do if 'string' == type (k) and not is_in_table (exclude, k) then -- do not pass along excluded parameters if v and ('' ~= v) then -- pass along only those parameters that have assigned values if 'unset' == v:lower() then -- special keyword to unset 'default' parameters set in the wrapper template v = ''; -- unset the value in the args table end add_parameter (k, v, args, list) -- add all other parameters to args in the style dictated by list; alias map only supported for local-template parameters end end end if _include_positional then for i, v in ipairs (pframe_args) do -- pass along positional parameters if 'unset' == v:lower() then -- special keyword to unset 'default' parameters set in the wrapper template v = ''; -- unset the value in the args table end add_parameter (i, v, args, list); end end end --[[--------------------------< _ M A I N >-------------------------------------------------------------------- Collect the various default and live parameters into args styled according to boolean list. returns name of the working or listed template or nil for an error message ]] local function _main (frame, args, list) local template; local exclude = {}; -- table of parameter names for parameters that are not passed to the working template local reuse_list = {}; -- table of pframe parameter names whose values are modified before they are passed to the working template as the same name local alias_map = {}; -- table that maps parameter aliases to working template canonical parameter names local _include_positional; if frame.args._exclude and ('' ~= frame.args._exclude) then -- if there is |_exclude= and it's not empty exclude = mw.text.split (frame.args._exclude, "%s*,%s*"); -- make a table from its contents end -- TODO: |_reuse= needs a better name (|_reuse=) if frame.args._reuse and ('' ~= frame.args._reuse) then -- if there is |_reuse= and it's not empty reuse_list = mw.text.split (frame.args._reuse, "%s*,%s*"); -- make a table from its contents end if frame.args['_alias-map'] and ('' ~= frame.args['_alias-map']) then -- if there is |_alias-map= and it's not empty alias_map = alias_map_get (frame.args['_alias-map']); -- make a table from its contents end template = frame_args_get (frame.args, args, list); -- get parameters provided in the {{#invoke:template wrapper|...|...}} if nil == template or '' == template then -- this is the one parameter that is required by this module return nil; -- not present, tell calling function to emit an error message end _include_positional = 'yes' == frame.args['_include-positional']; -- when true pass all positional parameters along with non-excluded named parameters to ... -- ... the working template; positional parameters are not excludable local _pframe_args = frame:getParent().args; -- here we get the wrapper template's 'live' parameters from pframe.args local pframe_args = {}; -- a local table that we can modify for k, v in pairs (_pframe_args) do -- make a copy that we can modify pframe_args[k] = v; end -- here we look for pframe parameters that are aliases of canonical parameter names; when found -- we replace the alias with the canonical. We do this here because the reuse_list works on -- canonical parameter names so first we convert alias parameter names to canonical names and then -- we remove those canonical names from the pframe table that are reused (provided to the working -- template through the frame args table) for k, v in pairs (alias_map) do -- k is alias name, v is canonical name if pframe_args[k] then -- if pframe_args has parameter with alias name pframe_args[v] = _pframe_args[k]; -- create new canonical name with alias' value pframe_args[k] = nil; -- unset the alias end end for k, v in pairs (pframe_args) do -- do enumerated parameter alias -> canonical translation if 'string' == type (k) then -- only named parameters can be enumerated if alias_map[k..'#'] then -- non-enumerated alias matches enumerated parameter pattern? enumerator at end only pframe_args[alias_map[k..'#']:gsub('#', '')] = v; -- remove '#' and copy parameter to pframe_args table pframe_args[k] = nil; -- unset the alias elseif k:match ('%d+') then -- if this parameter name contains digits local temp = k:gsub ('%d+', '#'); -- make a copy; digits replaced with single '#' local enum = k:match ('%d+'); -- get the enumerator if alias_map[temp] then -- if this parameter is a recognized enumerated alias pframe_args[alias_map[temp]:gsub('#', enum)] = v; -- use canonical name and replace '#' with enumerator and add to pframe_args pframe_args[k] = nil; -- unset the alias end end end end -- pframe parameters that are _reused are 'reused' have the form something like this: -- |chapter=[[wikisource:{{{chapter}}}|{{{chapter}}}]] -- where a parameter in the wrapping template is modified and then passed to the working template -- using the same parameter name (in this example |chapter=) -- remove parameters that will be reused for k, v in ipairs (reuse_list) do -- k is numerical index, v is canonical parameter name to ignore if pframe_args[v] then -- if pframe_args has parameter that should be ignored pframe_args[v] = nil; -- unset the ignored parameter end end pframe_args_get (pframe_args, args, exclude, _include_positional, list); -- add parameters and values to args that are not listed in the exclude table return template; -- args now has all default and live parameters, return working template name end --[[--------------------------< W R A P >---------------------------------------------------------------------- Template entry point. Call this function to 'execute' the working template ]] local function wrap (frame) local args = {}; -- table of default and live parameters and their values to be passed to the wrapped template local template; -- the name of the working template template = _main (frame, args, false); -- get default and live parameters and the name of the working template if not template then -- template name is required return error_msg; -- emit error message and abandon if template name not present end return frame:expandTemplate {title=template, args=args}; -- render the working template end --[[--------------------------< L I S T >---------------------------------------------------------------------- Template entry point. Call this function to 'display' the source for the working template. This function added as a result of a TfD here: Wikipedia:Templates_for_discussion/Log/2018_April_28#Module:PassArguments This function replaces a similarly named function which was used in {{cite compare}} and {{cite compare2}} Values in the args table are numerically indexed strings in the form 'name=value' ]] local function list(frame, do_link) local args = {}; -- table of default and live parameters and their values to be passed to the listed template local template; -- the name of the listed template template = _main (frame, args, true); -- get default and live parameters and the name of the listed template if not template then -- template name is required return error_msg; -- emit error message and abandon if template name not present end if do_link then template = ('[[%s|%s]]'):format(frame:expandTemplate{ title='Transclude', args = {template} }, template) end table.sort(args) for i = 1, #args do local stripped = args[i]:match('^' .. i .. '=([^=]*)$') if stripped then args[i] = stripped else break end end return frame:preprocess(table.concat({ '<code style="color:inherit; background:inherit; border:none;">&#123;&#123;', template, ('<wbr><nowiki>|%s</nowiki>'):rep(#args):format(unpack(args)), '&#125;&#125;</code>'})); -- render the template end local function link (frame) return list(frame, true) end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { link = link, list = list, wrap = wrap, }; 5e3d3ed3f3988725fb0fef6b44479bacc4210f37 Module:Nihongo 828 113 299 2022-10-22T09:05:07Z wikipedia>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain require('strict'); --[[--------------------------< E R R O R _ M E S S A G E S >-------------------------------------------------- error messaging; keys to this table are the template base names: 'nihongo', 'nihongo3', 'nihongo krt', 'nihongo foot' → 'nihongo' etc ]] local err_msg = { ['nihongo'] = 'Japanese or romaji text required', ['hanyu'] = 'Chinese or pinyin text required', } local err_cat = { ['nihongo'] = '[[Category:Nihongo template errors]]', ['hanyu'] = '[[Category:Hanyu template errors]]', } --[[--------------------------< C O N F I G U R A T I O N >---------------------------------------------------- configuration setting for the various templates. keys to this table are the template names without spacing ]] local cfg = { ['nihongo'] = { tag = 'ja', system = 'hepburn', system_link = '[[Hepburn romanization|Hepburn]]', err_msg = err_msg.nihongo, err_cat = err_cat.nihongo, }, ['nihongo3'] = { tag = 'ja', system = 'hepburn', err_msg = err_msg.nihongo, err_cat = err_cat.nihongo, }, ['nihongo krt'] = { tag = 'ja', system = 'hepburn', err_msg = err_msg.nihongo, err_cat = err_cat.nihongo, }, ['nihongo foot'] = { tag = 'ja', system = 'hepburn', system_link = '[[Hepburn romanization|Hepburn]]', err_msg = err_msg.nihongo, err_cat = err_cat.nihongo, }, ['hanyu'] = { tag = 'zh', system = 'pinyin', system_link = '[[Pinyin]]', err_msg = err_msg.hanyu, err_cat = err_cat.hanyu, }, ['hanyu3'] = { tag = 'zh', system = 'pinyin', err_msg = err_msg.hanyu, err_cat = err_cat.hanyu, }, ['hanyu hrt'] = { tag = 'zh', system = 'pinyin', err_msg = err_msg.hanyu, err_cat = err_cat.hanyu, }, ['hanyu foot'] = { tag = 'zh', system = 'pinyin', system_link = '[[Pinyin]]', err_msg = err_msg.hanyu, err_cat = err_cat.hanyu, }, } --[[--------------------------< E R R O R _ M E S S A G E >---------------------------------------------------- Creates an error message for {{nihongo}}, {{nihongo3}}, {{nihongo krt}}, and {{nihongo foot}} when these template are missing <japanese> or <romaji> inputs; names the offending template, links to template page, and adds article to Category:Nihongo template errors ]] local function error_message (template) local msg = {'<span class="error" style="font-size:100%">error: {{'}; table.insert (msg, template); table.insert (msg, '}}: '); table.insert (msg, cfg[template].err_msg); table.insert (msg, ' ([[Template:'); table.insert (msg, template); table.insert (msg, '|help]])</span>'); if 0 == mw.title.getCurrentTitle().namespace then table.insert (msg, cfg[template].err_cat); end return table.concat (msg); end --[[--------------------------< R E N D E R E R >-------------------------------------------------------------- Shared support function for nihingo(), nihongo3(), and nihongo_foot(). Calculates an index into formatting{} from set/unset parameters: args[1] (english text) has a value of 8 (set) or 0 (unset) args[2] (native text) has a value of 4 args[3] (romanized text) has a value of 2 args[4] (extra) has a value of 1 index, the sum of these values, gets the appropriate format string from formatting{} table with associated values from the formatting[index][2] table ]] local function renderer (args, formatting, extra2) local output; local index = 0; -- index into formatting{} local param_weight = {8, 4, 2, 1}; -- binary parameter weights: [1] = english (8), [2] = japanese (4), [3] = romaji (2), [4] = extra (1) for i=1, 5 do -- spin through args[1] – args[4] index = index + (args[i] and param_weight[i] or 0); -- calculate an index into formatting{} end output = (0 ~= index) and string.format (formatting[index][1] and formatting[index][1], formatting[index][2][1], formatting[index][2][2], formatting[index][2][3], formatting[index][2][4]) or nil; if extra2 then -- always just attached to the end (if there is an end) so not part of formatting{} output = output and (output .. ' ' .. extra2) or '<5p4n>' .. extra2; -- <5p4n> and </5p4n>: place holders for font-weight style spans; akin to stripmarkers, to be replaced end -- (nihongo and nihongo3) or removed (nihongo foot) return output and (output .. '</5p4n>') or ''; -- where there is output, add secret tag close end --[[--------------------------< R O M A N I Z E D _ K E R N >-------------------------------------------------- Add kerning when first or last character of romanized text contacts adjacent opening or closing paranthesis In this example, without kerning, the romanized characters 'j' and 'V' are italicized so will contact the parentheses (<i lang=\"ja-Latn\" title=\"Hepburn transliteration\">jV</i>) <ret_string> is the formatted template output (except that the magic string '<5p4n>' has not yet been replaced) <romanized> is the return from lang_module._transl() so is not wrapped in parentheses ]] local function romanized_kern (ret_string, romanized) if not romanized or ('' == romanized) then -- if romanized not set return ret_string; -- then we're done end local romanized_text = romanized:gsub ('%b<>', ''):gsub ('\'\'+', ''):gsub ('%[%[', ''):gsub ('%]%]', ''); -- strip html tags romanized = romanized:gsub ('([%(%)%.%%%+%-%*%?%[%^%$%]])', '%%%1'); -- escape lua pattern characters local romanized_has_leading_paren = ret_string:match ('%(' .. romanized); -- has a value if (<romanized>; nil else local romanized_has_trailing_paren = ret_string:match (romanized .. '%)'); -- has a value if <romanized>); nil else local kern_lead_pattern = '^[jpy]'; -- list of characters that when italicized contact unitalicized leading parenthesis local kern_tail_pattern = '[dfijkltCEFHIJKMNPR-Z\'"%?!%]]$'; -- list of characters that when italicized contact unitalicized trailing parenthesis local kern_right = '<span style="margin-right:.09em">(</span>%1'; -- %1 is <romanized> capture local kern_left = '%1<span style="margin-left:.09em">)</span>'; -- %1 is <romanized> capture if romanized_has_leading_paren and romanized_text:match (kern_lead_pattern) then ret_string = ret_string:gsub ('%((' .. romanized .. ')', kern_right); -- replace plain '(' with kerned '('; <romanized> included here to ensure that the correct '(' is kerned end if romanized_has_trailing_paren and romanized_text:match (kern_tail_pattern) then ret_string = ret_string:gsub ('(' .. romanized .. ')%)', kern_left); -- replace plain ')' with kerned ')'; <romanized> included here to ensure that the correct ')' is kerned end return ret_string; -- done end --[[--------------------------< C O M M O N >------------------------------------------------------------------ Common support for {{nihongo}} and {{hanyu}} render order: is translated (English), native, romanized <template> is used to select the appropriate cfg table ]] local function common (frame, template) local lang_module = require ('Module:Lang' .. (frame:getTitle():match ('/sandbox') or '')); -- if this module is the sandbox, use Module:lang/sandbox; Module:Lang else local args = require ('Module:Arguments').getArgs (frame); local english, native, romanized, extra, extra2 = args[1], args[2], args[3], args.extra or args[4], args.extra2 or args[5]; -- meaningful names args[4] = extra or args[4]; -- ensure that extra is 'positional' for use by renderer() local lead = 'yes' == args.lead; -- make boolean if not (native or romanized) then -- not present, return an error message return error_message (template); end if native then native = lead and lang_module._lang_xx_inherit ({['code']=cfg[template].tag, native, ['template']=template}) or lang_module._lang ({cfg[template].tag, native, ['template']=template}); -- add ja script with/without language prefix end if romanized then romanized = (lead and english and (cfg[template].system_link .. ': ') or '') .. lang_module._transl ({'ja', cfg[template].system, romanized}) or nil; end local formatting = { -- <5p4n> and </5p4n>: place holders for font-weight style spans; akin to stripmarkers, replaced before function returns {'<5p4n>(%s)', {extra}}, -- 1 - (extra) {'%s<5p4n>', {romanized}}, -- 2 - romanized {'%s<5p4n> (%s)', {romanized, extra}}, -- 3 - romanized (extra) {'<5p4n>(%s)', {native}}, -- 4 - native {'<5p4n>(%s, %s)', {native, extra}}, -- 5 - (native, extra) {'%s<5p4n> (%s)', {romanized, native}}, -- 6 - romanized (native) {'%s<5p4n> (%s, %s)', {romanized, native, extra}}, -- 7 - romanized (native, extra) {'%s<5p4n>', {english}}, -- 8 - english {'%s<5p4n> (%s)', {english, extra}}, -- 9 - english (extra) {'%s<5p4n> (%s)', {english, romanized}}, -- 10 - english (romanized) {'%s<5p4n> (%s, %s)', {english, romanized, extra}}, -- 11 - english (romanized, extra) {'%s<5p4n> (%s)', {english, native}}, -- 12 - english (native) {'%s<5p4n> (%s, %s)', {english, native, extra}}, -- 13 - english (native, extra) {'%s<5p4n> (%s, %s)', {english, native, romanized}}, -- 14 - english (native, romanized) {'%s<5p4n> (%s, %s, %s)', {english, native, romanized, extra}}, -- 15 - english (native, romanized, extra) } local ret_string = renderer (args, formatting, extra2) ret_string = romanized_kern (ret_string, romanized); -- kern romanized text when appropriate ret_string = ret_string:gsub ('<5p4n>', '<span style="font-weight: normal">'):gsub ('</5p4n>', '</span>'); -- replace 'secret' tags with proper tags return ret_string; -- because gsub returns the number of replacements made as second return value end --[[--------------------------< C O M M O N _ R O M A N I Z E D _ N A T I V E _ T R A N S L A T E D >---------- Common support for {{nihongo3}} and {{hanyu3}} render order: is romanized, native, translated (English) <template> is used to select the appropriate cfg table ]] local function common_romanized_native_translated (frame, template) local lang_module = require ('Module:Lang' .. (frame:getTitle():match ('/sandbox') or '')); -- if this module is the sandbox, use Module:lang/sandbox; Module:Lang else local args = require ('Module:Arguments').getArgs (frame); local english, native, romanized, extra, extra2 = args[1], args[2], args[3], args.extra or args[4], args.extra2 or args[5]; -- meaningful names args[4] = extra or args[4]; -- ensure that extra is 'positional' for use by renderer() if not (native or romanized) then -- not present, return an error message return error_message (template); end native = native and lang_module._lang ({cfg[template].tag, native}) or nil; romanized = romanized and lang_module._transl ({cfg[template].tag, cfg[template].system, romanized}) or nil; local formatting = { -- <5p4n> and </5p4n>: place holders for font-weight style spans; akin to stripmarkers, replaced before function returns {'<5p4n>(%s)', {extra}}, -- 1 - (extra) {'%s<5p4n>', {romanized}}, -- 2 - romanized {'%s<5p4n> (%s)', {romanized, extra}}, -- 3 - romanized (extra) {'<5p4n>(%s)', {native}}, -- 4 - native {'<5p4n>(%s, %s)', {native, extra}}, -- 5 - (native, extra) {'%s<5p4n> (%s)', {romanized, native}}, -- 6 - romanized (native) {'%s<5p4n> (%s, %s)', {romanized, native, extra}}, -- 7 - romanized (native, extra) {'%s<5p4n>', {english}}, -- 8 - english {'%s<5p4n> (%s)', {english, extra}}, -- 9 - english (extra) {'%s<5p4n> (%s)', {romanized, english}}, -- 10 - romanized (english) {'%s<5p4n> (%s, %s)', {romanized, english, extra}}, -- 11 - romanized (english, extra) {'%s<5p4n> (%s)', {english, native}}, -- 12 - english (native) {'%s<5p4n> (%s, %s)', {english, native, extra}}, -- 13 - english (native, extra) {'%s<5p4n> (%s, %s)', {romanized, native, english}}, -- 14 - romanized (native, english) {'%s<5p4n> (%s, %s, %s)', {romanized, native, english, extra}}, -- 15 - romanized (native, english, extra) } local ret_string = renderer (args, formatting, extra2) ret_string = ret_string:gsub ('<5p4n>', '<span style="font-weight: normal">'):gsub ('</5p4n>', '</span>'); -- replace 'secret' tags with proper tags return ret_string; -- because gsub returns the number of replacements made as second return value end --[[--------------------------< C O M M O N _ N A T I V E _ R O M A N I Z E D _ T R A N S L A T E D >---------- Common support for {{nihongo krt}} and {{hanyu krt}} render order: is native, romanized, translated (English) <template> is used to select the appropriate cfg table ]] local function common_native_romanized_translated (frame, template) local lang_module = require ('Module:Lang' .. (frame:getTitle():match ('/sandbox') or '')); -- if this module is the sandbox, use Module:lang/sandbox; Module:Lang else local args = require ('Module:Arguments').getArgs (frame); local english, native, romanized, extra, extra2 = args[1], args[2], args[3], args.extra or args[4], args.extra2 or args[5]; -- meaningful names args[4] = extra or args[4]; -- ensure that extra is 'positional' for use by renderer() if not (native or romanized) then -- not present, return an error message return error_message (template); end native = native and lang_module._lang ({cfg[template].tag, native}) or nil; romanized = romanized and lang_module._transl ({cfg[template].tag, cfg[template].system, romanized}) or nil; local formatting = { -- <5p4n> and </5p4n>: place holders for font-weight style spans; akin to stripmarkers, replaced before function returns {'<5p4n>(%s)', {extra}}, -- 1 - (extra) {'%s<5p4n>', {romanized}}, -- 2 - romanized {'%s<5p4n> (%s)', {romanized, extra}}, -- 3 - romanized (extra) {'<5p4n>%s', {native}}, -- 4 - native {'<5p4n>%s (%s)', {native, extra}}, -- 5 - native (extra) {'<5p4n>%s (%s)', {native, romanized}}, -- 6 - native (romanized) {'<5p4n>%s (%s, %s)', {native, romanized, extra}}, -- 7 - native (romanized, extra) {'%s<5p4n>', {english}}, -- 8 - english {'%s<5p4n> (%s)', {english, extra}}, -- 9 - english (extra) {'%s<5p4n> (%s)', {romanized, english}}, -- 10 - romanized (english) {'%s<5p4n> (%s, %s)', {romanized, english, extra}}, -- 11 - romanized (english, extra) {'<5p4n>%s (%s)', {native, english}}, -- 12 - native (english) {'<5p4n>%s (%s, %s)', {native, english, extra}}, -- 13 - native (english, extra) {'<5p4n>%s (%s, %s)', {native, romanized, english}}, -- 14 - native (romanized, english) {'<5p4n>%s (%s, %s, %s)', {native, romanized, english, extra}}, -- 15 - native (romanized, english, extra) } local ret_string = renderer (args, formatting, extra2) ret_string = romanized_kern (ret_string, romanized); -- kern romanized text when appropriate ret_string = ret_string:gsub ('<5p4n>', '<span style="font-weight: normal">'):gsub ('</5p4n>', '</span>'); -- replace 'secret' tags with proper tags return ret_string; -- because gsub returns the number of replacements made as second return value end --[[--------------------------< C O M M O N _ F O O T >-------------------------------------------------------- Common support for {{nihongo foot}} and {{hanyu foot}} render order: is English<ref>native, romanized</ref> <template> is used to select the appropriate cfg table ]] local function common_foot (frame, template) local lang_module = require ('Module:Lang' .. (frame:getTitle():match ('/sandbox') or '')); -- if this module is the sandbox, use Module:lang/sandbox; Module:Lang else local args = require ('Module:Arguments').getArgs (frame); local english, native, romanized, extra, extra2 = args[1], args[2], args[3], args.extra or args[4], args.extra2 or args[5]; -- meaningful names args[4] = extra or args[4]; -- ensure that extra is 'positional' for use by renderer() local post = args[6] or args.post; local group = args.group; local ref_name = args.ref_name local lead = 'yes' == args.lead; -- make boolean if not (native or romanized) then -- not present, return an error message return error_message (template); end if native then native = lead and lang_module._lang_xx_inherit ({['code']=cfg[template].tag, native}) or lang_module._lang ({cfg[template].tag, native}); -- add ja script with/without language prefix end if romanized then romanized = (lead and (cfg[template].system_link .. ': ') or '') .. lang_module._transl ({'ja', cfg[template].system, romanized}) or nil; end local formatting = { {'%s', {extra}}, -- 1 - extra {'%s', {romanized}}, -- 2 - romanized {'%s, %s', {romanized, extra}}, -- 3 - romanized, extra {'%s', {native}}, -- 4 - native {'%s, %s', {native, extra}}, -- 5 - native, extra {'%s, %s', {native, romanized}}, -- 6 - native romanized {'%s, %s, %s', {native, romanized, extra}}, -- 7 - native romanized, extra -- from here english is used in the mapping but not rendered by renderer so not included in the table {'', {''}}, -- 8 - english {'%s', {extra}}, -- 9 - extra {'%s', {romanized}}, -- 10 - romanized {'%s, %s', {romanized, extra}}, -- 11 - romanized, extra {'%s', {native}}, -- 12 - native {'%s, %s', {native, extra}}, -- 13 - native, extra {'%s, %s', {native, romanized}}, -- 14 - native romanized {'%s, %s, %s', {native, romanized, extra}}, -- 15 - native romanized, extra } if english and post then -- rewrite english to include |post= english = english .. post; -- if english has a value append post else just post elseif post then english = post; -- english not set, use post elseif not english then -- neither are set english = ''; -- make english an empty string for concatenation end if native or romanized or extra or extra2 then -- no ref tag when none of these are set (it would be empty) local content = renderer (args, formatting, extra2); content = content:gsub ('<5p4n>', ''):gsub ('</5p4n>$', '', 1); -- strip secret <5p4n> and </5p4n> tags added by renderer(); spans not used by this template return english .. frame:extensionTag ({name='ref', args={group=group, name=ref_name}, content=content}); -- english with attached reference tag else return english; -- nothing to be inside ref tag so just return english end end --[=[-------------------------< N I H O N G O >---------------------------------------------------------------- Implement {{nihongo}} using Module:Lang for language and transliteration markup {{Nihongo|<English>|<japanese>|<romaji>|<extra>|<extra2>|lead=yes}} <English>, <japanese>, and <romaji> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <japanese>: Japanese language text using Japanese script; TODO: require? <romaji>: Hepburn romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Hepburn romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> |lead=: takes one value 'yes'; renders language name same as {{lang-ja}} but also adds [[Hepburn romanization|Hepburn]]:<space> ahead of the romanization; TODO: in Module:Lang, turnoff tooltip for transl when |lead=yes ]=] local function nihongo (frame) return common (frame, 'nihongo') end --[=[-------------------------< N I H O N G O 3 >-------------------------------------------------------------- Implement {{nihongo3}} using Module:Lang for language and transliteration markup Similar to {{nihongo}} but changes rendered order and does not support |lead= {{Nihongo3|<English>|<japanese>|<romaji>|<extra>|<extra2>}} <English>, <japanese>, and <romaji> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <japanese>: Japanese language text using Japanese script; TODO: require? <romaji>: Hepburn romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Hepburn romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> ]=] local function nihongo3 (frame) return common_romanized_native_translated (frame, 'nihongo3') end --[=[-------------------------< N I H O N G O _ K R T >-------------------------------------------------------- Implement {{nihongo krt}} using Module:Lang for language and transliteration markup Similar to {{nihongo}} but changes rendered order and does not support |lead= {{Nihongo krt|<English>|<japanese>|<romaji>|<extra>|<extra2>}} <English>, <japanese>, and <romaji> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <japanese>: Japanese language text using Japanese script; TODO: require? <romaji>: Hepburn romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Hepburn romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> ]=] local function nihongo_krt (frame) return common_native_romanized_translated (frame, 'nihongo krt') end --[=[-------------------------< N I H O N G O _ F O O T >------------------------------------------------------ Implement {{nihongo_foot}} using Module:Lang for language and transliteration markup {{Nihongo foot|<English>|<japanese>|<romaji>|<extra>|<extra2>|<post>|lead=yes|group}} <English>, <japanese>, and <romaji> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <japanese>: Japanese language text using Japanese script; TODO: require? <romaji>: Hepburn romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Hepburn romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> <post> is positional or named: |post= is a postscript character preceding the <ref>..</ref> tag (after <English>) |lead=: takes one value 'yes'; renders language name same as {{lang-ja}} but also adds [[Hepburn romanization|Hepburn]]:<space> ahead of the romanization; TODO: in Module:Lang, turnoff tooltip for transl when |lead=yes in the live template |lead= also adds the Help:Installing Japanese character sets link; this is not supported in this code (nihongo nor nihongo3 have this support) |group=: the group attribute in <ref group="..."> and in {{reflist}} ]=] local function nihongo_foot (frame) return common_foot (frame, 'nihongo foot') end --[=[-------------------------< H A N Y U >-------------------------------------------------------------------- Implement {{hanyu}} using Module:Lang for language and transliteration markup {{hanyu|<English>|<chinese>|<pinyin>|<extra>|<extra2>|lead=yes}} <English>, <chinese>, and <pinyin> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <chinese>: Chinese language text using Chinese script; TODO: require? <pinyin>: Pinyin romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Pinyin romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> |lead=: takes one value 'yes'; renders language name same as {{lang-zh}} but also adds [[Pinyin]]:<space> ahead of the romanization; TODO: in Module:Lang, turnoff tooltip for transl when |lead=yes ]=] local function hanyu (frame) return common (frame, 'hanyu') end --[=[-------------------------< H A N Y U 3 >------------------------------------------------------------------ Implement {{hanyu3}} using Module:Lang for language and transliteration markup Similar to {{hanyu}} but changes rendered order and does not support |lead= {{hanyu3|<English>|<chinese>|<pinyin>|<extra>|<extra2>}} <English>, <chinese>, and <pinyin> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <chinese>: Chinese language text using Chinese script; TODO: require? <pinyin>: Pinyin romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Pinyin romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> ]=] local function hanyu3 (frame) return common_romanized_native_translated (frame, 'hanyu3') end --[=[-------------------------< H A N Y U _ H R T >------------------------------------------------------------ Implement {{hanyu hrt}} using Module:Lang for language and transliteration markup Similar to {{hanyu}} but changes rendered order and does not support |lead= {{hanyu krt|<English>|<chinese>|<pinyin>|<extra>|<extra2>}} <English>, <chinese>, and <pinyin> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <chinese>: Chinese language text using Chinese script; TODO: require? <pinyin>: Pinyin romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Pinyin romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> ]=] local function hanyu_hrt (frame) return common_native_romanized_translated (frame, 'hanyu hrt') end --[=[-------------------------< H A N Y U _ F O O T >---------------------------------------------------------- Implement {{hanyu_foot}} using Module:Lang for language and transliteration markup {{hanyu foot|<English>|<chinese>|<pinyin>|<extra>|<extra2>|<post>|lead=yes|group}} <English>, <chinese>, and <pinyin> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <chinese>: Chinese language text using Chinese script; TODO: require? <pinyin>: Pinyin romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Pinyin romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> <post> is positional or named: |post= is a postscript character preceding the <ref>..</ref> tag (after <English>) |lead=: takes one value 'yes'; renders language name same as {{lang-zh}} but also adds [[Pinyin]]:<space> ahead of the romanization; TODO: in Module:Lang, turnoff tooltip for transl when |lead=yes in the live template |lead= also adds the Help:Installing Chinese character sets link; this is not supported in this code (hanyu nor hanyu3 have this support) |group=: the group attribute in <ref group="..."> and in {{reflist}} ]=] local function hanyu_foot (frame) return common_foot (frame, 'hanyu foot') end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { nihongo = nihongo, nihongo3 = nihongo3, nihongokrt = nihongo_krt, -- TODO: rename function name in {{#invoke}} to use nihongo_krt; delete this line nihongo_krt = nihongo_krt, nihongo_foot = nihongo_foot, hanyu = hanyu, hanyu3 = hanyu3, hanyu_hrt = hanyu_hrt, hanyu_foot = hanyu_foot, } 7ad11952c5404f68ef3dc04de743da59f35238c9 Module:Section link 828 196 501 2022-10-22T09:09:53Z wikipedia>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain -- This module implements {{section link}}. require('strict'); local checkType = require('libraryUtil').checkType local p = {} local function makeSectionLink(page, section, display) display = display or section page = page or '' -- MediaWiki doesn't allow these in `page`, so only need to do for `section` if type(section) == 'string' then section = string.gsub(section, "{", "&#x7B;") section = string.gsub(section, "}", "&#x7D;") end return string.format('[[%s#%s|%s]]', page, section, display) end local function normalizeTitle(title) title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '') title = mw.ustring.gsub(title, "%b<>", "") return mw.title.new(title).prefixedText end function p._main(page, sections, options, title) -- Validate input. checkType('_main', 1, page, 'string', true) checkType('_main', 3, options, 'table', true) if sections == nil then sections = {} elseif type(sections) == 'string' then sections = {sections} elseif type(sections) ~= 'table' then error(string.format( "type error in argument #2 to '_main' " .. "(string, table or nil expected, got %s)", type(sections) ), 2) end options = options or {} title = title or mw.title.getCurrentTitle() -- Deal with blank page names elegantly if page and not page:find('%S') then page = nil options.nopage = true end -- Make the link(s). local isShowingPage = not options.nopage if #sections <= 1 then local linkPage = page or '' local section = sections[1] or 'Notes' local display = '§&nbsp;' .. section if isShowingPage then page = page or title.prefixedText if options.display and options.display ~= '' then if normalizeTitle(options.display) == normalizeTitle(page) then display = options.display .. ' ' .. display else error(string.format( 'Display title "%s" was ignored since it is ' .. "not equivalent to the page's actual title", options.display ), 0) end else display = page .. ' ' .. display end end return makeSectionLink(linkPage, section, display) else -- Multiple sections. First, make a list of the links to display. local ret = {} for i, section in ipairs(sections) do ret[i] = makeSectionLink(page, section) end -- Assemble the list of links into a string with mw.text.listToText. -- We use the default separator for mw.text.listToText, but a custom -- conjunction. There is also a special case conjunction if we only -- have two links. local conjunction if #sections == 2 then conjunction = '&#8203; and ' else conjunction = ', and ' end ret = mw.text.listToText(ret, nil, conjunction) -- Add the intro text. local intro = '§§&nbsp;' if isShowingPage then intro = (page or title.prefixedText) .. ' ' .. intro end ret = intro .. ret return ret end end function p.main(frame) local yesno = require('Module:Yesno') local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Section link', valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does this. if value ~= '' or key == 1 then return value end end }) for k, v in pairs(args) do -- replace underscores in the positional parameter values if 'number' == type(k) then if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters else args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores end end end -- Sort the arguments. local page local sections, options = {}, {} for k, v in pairs(args) do if k == 1 then -- Doing this in the loop because of a bug in [[Module:Arguments]] -- when using pairs with deleted arguments. page = mw.text.decode(v, true) elseif type(k) == 'number' then sections[k] = v else options[k] = v end end options.nopage = yesno (options.nopage); -- make boolean -- Extract section from page, if present if page then local p, s = page:match('^(.-)#(.*)$') if p then page, sections[1] = p, s end end -- Compress the sections array. local function compressArray(t) local nums, ret = {}, {} for num in pairs(t) do nums[#nums + 1] = num end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end sections = compressArray(sections) return p._main(page, sections, options) end return p 5cc61d43dc601ca43e9472500fc5cd09ca7cea44 Module:Yesno 828 5 147 7 2022-10-28T05:41:15Z meta>Agent Isai 0 1 revision imported from [[:metawikimedia:Module:Yesno]]: Required for local usage Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:Arguments 828 6 149 9 2022-10-28T05:41:15Z meta>Agent Isai 0 1 revision imported from [[:metawikimedia:Module:Arguments]]: Required for local usage Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Template:Lua 10 64 193 125 2022-10-28T05:41:39Z meta>Agent Isai 0 1 revision imported from [[:metawikimedia:Template:Lua]]: Required for local usage wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude>{{Lua|Module:Lua banner}}{{documentation}}[[Category:Utility templates]]</noinclude> fd85a870209733ca65a7290fa45f6b4f321bac0b Module:Lua banner/config 828 79 191 2022-10-28T05:41:41Z meta>Agent Isai 0 1 revision imported from [[:metawikimedia:Module:Lua_banner/config]]: Required for local usage Scribunto text/plain local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpage_blacklist'] = { ['doc'] = true, ['sandbox'] = true, ['sandbox2'] = true, ['testcases'] = true, } -- Allow wishes: whether wishes for conversion to Lua are allowed. -- If true, calls with zero parameters are valid, and considered to be wishes: -- The box’s text is “This template should use Lua”, and cfg['wish_category'] is -- added. If false, such calls are invalid, an error message appears, and -- cfg['error_category'] is added. cfg['allow_wishes'] = false -- Default category: this category is added if the module call contains errors -- (e.g. no module listed). A category name without namespace, or nil -- to disable categorization (not recommended). cfg['error_category'] = 'Lua templates with errors' -- Wish category: this category is added if no module is listed, and wishes are -- allowed. (Not used if wishes are not allowed.) A category name without -- namespace, or nil to disable categorization. cfg['wish_category'] = nil -- Default category: this category is added if none of the below module_categories -- matches the first module listed. A category name without namespace, or nil -- to disable categorization. cfg['default_category'] = 'Lua-based templates' -- Module categories: one of these categories is added if the first listed module -- is the listed module (e.g. {{Lua|Module:String}} adds -- [[Category:Lua String-based templates]].) Format: -- ['<module name>'] = '<category name>' -- where neither <module name> nor <category name> contains namespace. An empty -- table (i.e. no module-based categorization) will suffice on smaller wikis. cfg['module_categories'] = { ['Citation'] = 'Lua-based citation templates', ['Citation/CS1'] = 'Lua-based citation templates', } return cfg -- Don’t touch this line. 96ff2360e00fa7bf1df8fa9bea988789b8a82cab Module:No globals 828 75 155 2022-10-28T05:42:58Z meta>Agent Isai 0 1 revision imported from [[:metawikimedia:Module:No_globals]]: Required for local usage Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then -- perf optimization here and below: do not load Module:TNT unless there is an error error(require('Module:TNT').format('I18n/No globals', 'err-read', tostring(k)), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error(require('Module:TNT').format('I18n/No globals', 'err-write', tostring(k)), 2) end rawset(t, k, v) end setmetatable(_G, mt) efcb47c74e7e2bb9a4ad8764d99a0afce8fed410 Module:Template translation 828 74 151 2022-10-28T05:42:59Z meta>Agent Isai 0 6 revisions imported from [[:metawikimedia:Module:Template_translation]]: Required for local usage Scribunto text/plain local this = {} function this.checkLanguage(subpage, default) --[[Check first if there's an any invalid character that would cause the mw.language.isKnownLanguageTag function() to throw an exception: - all ASCII controls in [\000-\031\127], - double quote ("), sharp sign (#), ampersand (&), apostrophe ('), - slash (/), colon (:), semicolon (;), lower than (<), greater than (>), - brackets and braces ([, ], {, }), pipe (|), backslash (\\) All other characters are accepted, including space and all non-ASCII characters (including \192, which is invalid in UTF-8). --]] if mw.language.isValidCode(subpage) and mw.language.isKnownLanguageTag(subpage) --[[However "SupportedLanguages" are too restrictive, as they discard many valid BCP47 script variants (only because MediaWiki still does not define automatic transliterators for them, e.g. "en-dsrt" or "fr-brai" for French transliteration in Braille), and country variants, (useful in localized data, even if they are no longer used for translations, such as zh-cn, also useful for legacy codes). We want to avoid matching subpagenames containing any uppercase letter, (even if they are considered valid in BCP 47, in which they are case-insensitive; they are not "SupportedLanguages" for MediaWiki, so they are not "KnownLanguageTags" for MediaWiki). To be more restrictive, we exclude tags * for specific uses in template subpages and unusable as language tags; * that is not ASCII and not a lowercase letter, minus-hyphen, or digit, or does not start by a letter or does not finish by a letter or digit; * or that has subtags with more than 8 characters between hyphens; * or that has two hyphens. --]] or subpage ~= "doc" and subpage ~= "layout" and subpage ~= "button" and subpage ~= "buttons" and subpage ~= "sandbox" and subpage ~= "testcase" and subpage ~= "testcases" and string.find(subpage, "^[%l][%-%d%l]*[%d%l]$") ~= nil and string.find(subpage, "[%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l]") == nil and string.find(subpage, "%-%-") == nil then return subpage end -- Otherwise there's currently no known language subpage return default end --[[Get the last subpage of an arbitrary page if it is a translation. To be used from templates. ]] function this.getLanguageSubpage(frame) local title = frame and frame.args[1] if not title or title == '' then title = mw.title.getCurrentTitle() end return this._getLanguageSubpage(title) end --[[Get the last subpage of an arbitrary page if it is a translation. To be used from Lua. ]] function this._getLanguageSubpage(title) if type(title) == 'string' then title = mw.title.new(title) end if not title then -- invalid title return nil end --[[This code does not work in all namespaces where the Translate tool works. -- It works in the main namespace on Meta because it allows subpages there -- It would not work in the main namespace of English Wikipedia (but the -- articles are monolignual on that wiki). -- On Meta-Wiki the main space uses subpages and its pages are translated. -- The Translate tool allows translatng pages in all namespaces, even if -- the namespace officially does not have subpages. -- On Meta-Wiki the Category namespace still does not have subpages enabled, -- even if they would be very useful for categorizing templates, that DO have -- subpages (for documentatio and tstboxes pages). This is a misconfiguration -- bug of Meta-Wiki. The work-around is to split the full title and then -- get the last titlepart. local subpage = title.subpageText --]] local titleparts = mw.text.split(title.fullText, '/') local subpage = titleparts[#titleparts] return this.checkLanguage(subpage, '') end --[[Get the last subpage of the current page if it is a translation. ]] function this.getCurrentLanguageSubpage() return this._getLanguageSubpage(mw.title.getCurrentTitle()) end --[[Get the first part of the language code of the subpage, before the '-'. --]] function this.getMainLanguageSubpage() parts = mw.text.split(this.getCurrentLanguageSubpage(), '-') return parts[1] end --[[Get the last subpage of the current frame if it is a translation. Not used locally. --]] function this.getFrameLanguageSubpage(frame) return this._getLanguageSubpage(frame:getParent():getTitle()) end --[[Get the language of the current page. Not used locally. --]] function this.getLanguage() local subpage = mw.title.getCurrentTitle().subpageText return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode()) end --[[Get the language of the current frame. Not used locally. --]] function this.getFrameLanguage(frame) local titleparts = mw.text.split(frame:getParent():getTitle(), '/') local subpage = titleparts[#titleparts] return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode()) end function this.title(namespace, basepagename, subpage) local message, title local pagename = basepagename if (subpage or '') ~= '' then pagename = pagename .. '/' .. subpage end local valid, title = xpcall(function() return mw.title.new(pagename, namespace) -- costly end, function(msg) -- catch undocumented exception (!?) -- thrown when namespace does not exist. The doc still -- says it should return a title, even in that case... message = msg end) if valid and title ~= nil and (title.id or 0) ~= 0 then return title end return { -- "pseudo" mw.title object with id = nil in case of error prefixedText = pagename, -- the only property we need below message = message -- only for debugging } end --[[If on a translation subpage (like Foobar/de), this function returns a given template in the same language, if the translation is available. Otherwise, the template is returned in its default language, without modification. This is aimed at replacing the current implementation of Template:TNTN. This version does not expand the returned template name: this solves the problem of self-recursion in TNT when translatable templates need themselves to transclude other translable templates (such as Tnavbar). --]] function this.getTranslatedTemplate(frame, withStatus) local args = frame.args local pagename = args['template'] --[[Check whether the pagename is actually in the Template namespace, or if we're transcluding a main-namespace page. (added for backward compatibility of Template:TNT) ]] local namespace, title = args['tntns'] or '' if namespace ~= '' then -- Checks for tntns parameter for custom ns. title = this.title(namespace, pagename) -- Costly else -- Supposes that set page is in ns10. namespace = 'Template' title = this.title(namespace, pagename) -- Costly if title.id == nil then -- not found in the Template namespace, assume the main namespace (for backward compatibility) namespace = '' title = this.title(namespace, pagename) -- Costly end end -- Get the last subpage and check if it matches a known language code. local subpage = args['uselang'] or '' if subpage == '' then subpage = this.getCurrentLanguageSubpage() end if subpage == '' then -- Check if a translation of the pagename exists in English local newtitle = this.title(namespace, pagename, 'en') -- Costly -- Use the translation when it exists if newtitle.id ~= nil then title = newtitle end else -- Check if a translation of the pagename exists in that language local newtitle = this.title(namespace, pagename, subpage) -- Costly if newtitle.id == nil then -- Check if a translation of the pagename exists in English newtitle = this.title(namespace, pagename, 'en') -- Costly end -- Use the translation when it exists if newtitle.id ~= nil then title = newtitle end end -- At this point the title should exist if withStatus then -- status returned to Lua function below return title.prefixedText, title.id ~= nil else -- returned directly to MediaWiki return title.prefixedText end end --[[If on a translation subpage (like Foobar/de), this function renders a given template in the same language, if the translation is available. Otherwise, the template is rendered in its default language, without modification. This is aimed at replacing the current implementation of Template:TNT. Note that translatable templates cannot transclude themselves other translatable templates, as it will recurse on TNT. Use TNTN instead to return only the effective template name to expand externally, with template parameters also provided externally. --]] function this.renderTranslatedTemplate(frame) local title, found = this.getTranslatedTemplate(frame, true) -- At this point the title should exist prior to performing the expansion -- of the template, otherwise render a red link to the missing page -- (resolved in its assumed namespace). If we don't tet this here, a -- script error would be thrown. Returning a red link is consistant with -- MediaWiki behavior when attempting to transclude inexistant templates. if not found then return '[[' .. title .. ']]' end -- Copy args pseudo-table to a proper table so we can feed it to expandTemplate. -- Then render the pagename. local args = frame.args local pargs = (frame:getParent() or {}).args local arguments = {} if (args['noshift'] or '') == '' then for k, v in pairs(pargs) do local n = tonumber(k) or 0 if n <= 0 then -- unnumbered args arguments[k] = v elseif n >= 2 then -- numbered args >= 2 need to be shifted arguments[n - 1] = v end end else -- special case where TNT is used as autotranslate -- (don't shift again what is shifted in the invokation) for k, v in pairs(pargs) do arguments[k] = v end end arguments['template'] = title -- override the existing parameter of the base template name supplied with the full name of the actual template expanded arguments['tntns'] = nil -- discard the specified namespace override arguments['uselang'] = args['uselang'] -- argument forwarded into parent frame arguments['noshift'] = args['noshift'] -- argument forwarded into parent frame return frame:expandTemplate{title = ':' .. title, args = arguments} end --[[A helper for mocking TNT in Special:TemplateSandbox. TNT breaks TemplateSandbox; mocking it with this method means templates won't be localized but at least TemplateSandbox substitutions will work properly. Won't work with complex uses. --]] function this.mockTNT(frame) local pargs = (frame:getParent() or {}).args local arguments = {} for k, v in pairs(pargs) do local n = tonumber(k) or 0 if n <= 0 then -- unnumbered args arguments[k] = v elseif n >= 2 then -- numbered args >= 2 need to be shifted arguments[n - 1] = v end end if not pargs[1] then return '' end return frame:expandTemplate{title = 'Template:' .. pargs[1], args = arguments} end return this 5d6ccce18a15ce0078fd1918b6afeb5b443f37ee Module:Documentation/i18n 828 77 177 2022-10-28T05:43:07Z meta>Agent Isai 0 2 revisions imported from [[:metawikimedia:Module:Documentation/i18n]]: Required for local usage Scribunto text/plain local format = require('Module:TNT').format local i18n = {} i18n['cfg-error-msg-type'] = format('I18n/Documentation', 'cfg-error-msg-type') i18n['cfg-error-msg-empty'] = format('I18n/Documentation', 'cfg-error-msg-empty') -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. i18n['template-namespace-heading'] = format('I18n/Documentation', 'template-namespace-heading') -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. i18n['module-namespace-heading'] = format('I18n/Documentation', 'module-namespace-heading') -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. i18n['file-namespace-heading'] = format('I18n/Documentation', 'file-namespace-heading') -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. i18n['other-namespaces-heading'] = format('I18n/Documentation', 'other-namespaces-heading') -- cfg['view-link-display'] -- The text to display for "view" links. i18n['view-link-display'] = format('I18n/Documentation', 'view-link-display') -- cfg['edit-link-display'] -- The text to display for "edit" links. i18n['edit-link-display'] = format('I18n/Documentation', 'edit-link-display') -- cfg['history-link-display'] -- The text to display for "history" links. i18n['history-link-display'] = format('I18n/Documentation', 'history-link-display') -- cfg['purge-link-display'] -- The text to display for "purge" links. i18n['purge-link-display'] = format('I18n/Documentation', 'purge-link-display') -- cfg['create-link-display'] -- The text to display for "create" links. i18n['create-link-display'] = format('I18n/Documentation', 'create-link-display') return i18n 9a9f234b177a424f1fc465eb25c484eff54905c0 Module:Documentation/styles.css 828 52 179 101 2022-10-28T05:43:10Z meta>Agent Isai 0 31 revisions imported from [[:metawikimedia:Module:Documentation/styles.css]]: Required for local usage sanitized-css text/css /* {{PP-template}} */ .ts-doc-sandbox .mbox-image { padding:.75em 0 .75em .75em; } .ts-doc-doc { clear: both; background-color: #ecfcf4; border: 1px solid #a2a9b1; margin-top: 1em; padding: 5px; } .ts-doc-header { padding-bottom: 3px; border-bottom: 1px solid #a2a9b1; margin-bottom: 1ex; } .ts-doc-header .ts-tlinks-tlinks { display: inline-block; line-height: 24px; margin-left: 1em; } .ts-doc-header .ts-tlinks-tlinks a.external { color: #0645ad; } .ts-doc-header .ts-tlinks-tlinks a.external:visited { color: #0b0080; } .ts-doc-header .ts-tlinks-tlinks a.external:active { color: #faa700; } .ts-doc-content:after { content: ''; clear: both; display: block; } .ts-doc-heading { display: inline-block; padding-left: 55px; background: center left/50px no-repeat; background-image: url(https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png); background-image: url(https://upload.wikimedia.org/wikipedia/commons/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg); font-size: 1.5em; } .ts-doc-content > *:first-child, .ts-doc-footer > *:first-child { margin-top: .5em; } .ts-doc-content > *:last-child, .ts-doc-footer > *:last-child { margin-bottom: .5em; } .ts-doc-footer { background-color: #ecfcf4; border: 1px solid #a2a9b1; padding: .25em 1em; margin-top: .2em; font-style: italic; } .ts-doc-footer small { font-style: normal; } .ts-doc-sandbox { clear: both; } c37b0ddfd0b1c128c187ca56721d1c4e481b05ff Template:IsDocSubpage 10 78 183 2022-10-28T05:43:20Z meta>Agent Isai 0 1 revision imported from [[:metawikimedia:Template:IsDocSubpage]]: Required for local usage wikitext text/x-wiki <onlyinclude><includeonly>{{#ifexpr: ( {{#ifeq:{{lc:{{SUBPAGENAME}}}}|{{lc:{{{override|doc}}}}}|1|0}} or ( {{#ifeq:{{lc:{{#titleparts:{{FULLPAGENAME}}|-1|-2}}}}|{{lc:{{{override|doc}}}}}|1|0}} and {{#if:{{#invoke:Template translation|getLanguageSubpage}}|1|0}} ) )<!-- -->|{{{true|1}}}<!-- -->|{{{false|}}}<!-- -->}}</includeonly></onlyinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> e60f69b26953d441bf5b76229c9222f16c042ae6 Module:Message box/configuration 828 10 157 2022-11-09T19:50:51Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:Message_box/configuration]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } b6f0151037e6867b577c8cca32ff297e48697a10 Module:Infobox 828 17 161 2022-11-09T19:51:01Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:Infobox]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain -- -- This module implements {{Infobox}} -- local p = {} local navbar = require('Module:Navbar')._navbar local args = {} local origArgs local root local function notempty( s ) return s and s:match( '%S' ) end local function fixChildBoxes(sval, tt) if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end return s else return sval end end local function union(t1, t2) -- Returns the union of the values of two tables, as a sequence. local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end local function getArgNums(prefix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end local function addRow(rowArgs) -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. if rowArgs.header then root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :attr('id', rowArgs.rowid) :tag('th') :attr('colspan', 2) :attr('id', rowArgs.headerid) :addClass(rowArgs.class) :addClass(args.headerclass) :css('text-align', 'center') :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) elseif rowArgs.data then local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) row:attr('id', rowArgs.rowid) if rowArgs.label then row :tag('th') :attr('scope', 'row') :attr('id', rowArgs.labelid) :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') if not rowArgs.label then dataCell :attr('colspan', 2) :css('text-align', 'center') end dataCell :attr('id', rowArgs.dataid) :addClass(rowArgs.class) :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :newline() :wikitext(fixChildBoxes(rowArgs.data, 'td')) end end local function renderTitle() if not args.title then return end root :tag('caption') :addClass(args.titleclass) :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end root :tag('tr') :tag('th') :attr('colspan', 2) :addClass(args.aboveclass) :css('text-align', 'center') :css('font-size', '125%') :css('font-weight', 'bold') :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end root :tag('tr') :tag('td') :attr('colspan', '2') :addClass(args.belowclass) :css('text-align', 'center') :cssText(args.belowstyle) :newline() :wikitext(fixChildBoxes(args.below,'td')) end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addRow({ data = args['subheader' .. tostring(num)], datastyle = args.subheaderstyle or args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :cssText(args.captionstyle) :wikitext(caption) end addRow({ data = tostring(data), datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end local function renderRows() -- Gets the union of the header and data argument numbers, -- and renders them all in order using addRow. local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)], dataid = args['dataid' .. tostring(num)], labelid = args['labelid' .. tostring(num)], headerid = args['headerid' .. tostring(num)], rowid = args['rowid' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end root :tag('tr') :tag('td') :attr('colspan', '2') :css('text-align', 'right') :wikitext(navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'})) end end local function renderTrackingCategories() if args.decat ~= 'yes' then if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles which use infobox templates with no data rows]]') end if args.child == 'yes' and args.title then root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]') end end end local function _infobox() -- Specify the overall layout of the infobox, with special settings -- if the infobox is used as a 'child' inside another infobox. if args.child ~= 'yes' then root = mw.html.create('table') root :addClass('infobox') :addClass(args.bodyclass) if args.subbox == 'yes' then root :css('padding', '0') :css('border', 'none') :css('margin', '-3px') :css('width', 'auto') :css('min-width', '100%') :css('font-size', '100%') :css('clear', 'none') :css('float', 'none') :css('background-color', 'transparent') else root :css('width', '22em') end root :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end renderSubheaders() renderImages() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderTrackingCategories() return tostring(root) end local function preprocessSingleArg(argName) -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end local function preprocessArgs(prefixTable, step) -- Assign the parameters with the given prefixes to the args table, in order, in batches -- of the step size specified. This is to prevent references etc. from appearing in the -- wrong order. The prefixTable should be an array containing tables, each of which has -- two possible fields, a "prefix" string and a "depend" table. The function always parses -- parameters containing the "prefix" string, but only parses parameters in the "depend" -- table if the prefix parameter is present and non-blank. if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones. preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present and not blank, or -- we are processing "prefix1" and "prefix" is present and not blank, and -- if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end function p.infobox(frame) -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end -- Parse the data parameters in the same order that the old {{infobox}} did, so that -- references etc. will display in the expected places. Parameters that depend on -- another parameter are only processed if that parameter is present, to avoid -- phantom references appearing in article reference lists. preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'}, {prefix = 'dataid'}, {prefix = 'labelid'}, {prefix = 'headerid'}, {prefix = 'rowid'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent preprocessSingleArg('decat') return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } .. _infobox() end return p eccecf7ea52ce105242adb57836ea74e04395312 31 2022-12-27T21:29:12Z wikipedia>Izno 0 merge hlist here Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:List 828 19 185 2022-11-09T19:51:04Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:List]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain -- This module outputs different kinds of lists. At the moment, bulleted, -- unbulleted, horizontal, ordered, and horizontal ordered lists are supported. local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Template:Flatlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Template:Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for i, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for i, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for i, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p b60cb90a28f54a237f389f8009157816b631d806 Module:TableTools 828 20 159 37 2022-11-09T19:51:05Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:TableTools]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain --[[ ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should -- -- not be called directly from #invoke. -- ------------------------------------------------------------------------------------ --]] local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti --[[ ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ --]] function p.isPositiveInteger(v) if type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity then return true else return false end end --[[ ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a value can be a valid table key. Lua will -- generate an error if a NaN is used as a table key. ------------------------------------------------------------------------------------ --]] function p.isNan(v) if type(v) == 'number' and tostring(v) == '-nan' then return true else return false end end --[[ ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ --]] function p.shallowClone(t) local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end --[[ ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ --]] function p.removeDuplicates(t) checkType('removeDuplicates', 1, t, 'table') local isNan = p.isNan local ret, exists = {}, {} for i, v in ipairs(t) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end --[[ ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ --]] function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k, v in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end --[[ ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will -- return {1, 3, 6}. ------------------------------------------------------------------------------------ --]] function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') return s end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k, v in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end --[[ ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table -- of subtables in the format -- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} } -- Keys that don't end with an integer are stored in a subtable named "other". -- The compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ --]] function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end --[[ ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ --]] function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end --[[ ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ --]] function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end --[[ ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ --]] function p.size(t) checkType('size', 1, t, 'table') local i = 0 for k in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 else -- This will fail with table, boolean, function. return item1 < item2 end end --[[ Returns a list of the keys in a table, sorted using either a default comparison function or a custom keySort function. ]] function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' }) end local list = {} local index = 1 for key, value in pairs(t) do list[index] = key index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(list, keySort) end return list end --[[ Iterates through a table, with the keys sorted using the keysToList function. If there are only numerical keys, sparseIpairs is probably more efficient. ]] function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local list = p.keysToList(t, keySort, true) local i = 0 return function() i = i + 1 local key = list[i] if key ~= nil then return key, t[key] else return nil, nil end end end --[[ Returns true if all keys in the table are consecutive integers starting at 1. --]] function p.isArray(t) checkType("isArray", 1, t, "table") local i = 0 for k, v in pairs(t) do i = i + 1 if t[i] == nil then return false end end return true end -- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 } function p.invert(array) checkType("invert", 1, array, "table") local map = {} for i, v in ipairs(array) do map[v] = i end return map end --[[ { "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true } --]] function p.listToSet(t) checkType("listToSet", 1, t, "table") local set = {} for _, item in ipairs(t) do set[item] = true end return set end --[[ Recursive deep copy function. Preserves identities of subtables. ]] local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = deepcopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end --[[ Concatenates all values in the table that are indexed by a number, in order. sparseConcat{ a, nil, c, d } => "acd" sparseConcat{ nil, b, c, d } => "bcd" ]] function p.sparseConcat(t, sep, i, j) local list = {} local list_i = 0 for _, v in p.sparseIpairs(t) do list_i = list_i + 1 list[list_i] = v end return table.concat(list, sep, i, j) end --[[ -- This returns the length of a table, or the first integer key n counting from -- 1 such that t[n + 1] is nil. It is similar to the operator #, but may return -- a different value when there are gaps in the array portion of the table. -- Intended to be used on data loaded with mw.loadData. For other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of -- the number of unnamed template parameters, so use this function for -- frame.args. --]] function p.length(t) local i = 1 while t[i] ~= nil do i = i + 1 end return i - 1 end function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p fe918509f168332267834b3a6f5c219a9de5b2e7 Module:Navbar 828 36 163 2022-11-09T19:51:14Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:Navbar]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p a5c8d3a8f8beb18984ea7f145ddbdf88a065d23e Module:Navbar/configuration 828 37 165 2022-11-09T19:51:15Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:Navbar/configuration]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } bbf3d86b48a5b40835e8e232ae9821e6bca390ec 71 2022-12-29T18:18:21Z wikipedia>Izno 0 add hlist/styles.css Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Documentation 828 50 171 2022-11-09T19:51:21Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:Documentation]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs local messageBox = require('Module:Message box') -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local i18n = mw.loadData('Module:Documentation/i18n') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-type', cfgKey, expectType, type(msg)), 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-empty', '$' .. match, cfgKey), 4) end local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal) return ret end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end return '<small>(' .. table.concat(ret, ' &#124; ') .. ')</small>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Load TemplateStyles ---------------------------------------------------------------------------- p.main = function(frame) local parent = frame.getParent(frame) local output = p._main(parent.args) return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. output end ---------------------------------------------------------------------------- -- Main function ---------------------------------------------------------------------------- function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user -- -- Messages: -- 'main-div-id' --> 'template-documentation' -- 'main-div-classes' --> 'template-documentation iezoomfix' --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) -- This div tag is from {{documentation/start box}}, but moving it here -- so that we don't have to worry about unclosed tags. :tag('div') :attr('id', message('main-div-id')) :addClass(message('main-div-class')) :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :done() :wikitext(p._endBox(args, env)) :wikitext(p.addTrackingCategories(env)) return tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title objects and other namespace- or -- path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- env.printTitle - the print version of the template, located at the /Print subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.printTitle() --[[ -- Title object for the /Print subpage. -- Messages: -- 'print-subpage' --> 'Print' --]] return env.templateTitle:subPageTitle(message('print-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the same as the -- subject namespace. However, pages in the Article, File, MediaWiki or Category -- namespaces must have their /doc, /sandbox and /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', {page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[w:Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[w:Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local frame = mw.getCurrentFrame() local isPreviewing = frame:preprocess('{{REVISIONID}}') == '' -- True if the page is being previewed. local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if isPreviewing or not compareUrl then text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) else local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. text = text .. makeCategoryLink(message('sandbox-category')) omargs.text = text omargs.class = message('sandbox-class') return messageBox.main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local title = env.title local protectionLevels local protectionTemplate = message('protection-template') local namespace = title.namespace if not (protectionTemplate and (namespace == 10 or namespace == 828)) then -- Don't display the protection template if we are not in the template or module namespaces. return nil end protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editLevels = protectionLevels.edit local moveLevels = protectionLevels.move if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then -- The page is full-move protected, or full, template, or semi-protected. local frame = mw.getCurrentFrame() return frame:expandTemplate{title = protectionTemplate, args = message('protection-template-args', nil, 'table')} else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = i18n['view-link-display'] data.editLinkDisplay = i18n['edit-link-display'] data.historyLinkDisplay = i18n['history-link-display'] data.purgeLinkDisplay = i18n['purge-link-display'] -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 6 then -- File namespace preload = message('file-docpage-preload') elseif subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = i18n['create-link-display'] return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. return s :gsub('%[', '&#91;') -- Replace square brackets with HTML entities. :gsub('%]', '&#93;') end local ret local docTitle = data.docTitle local title = data.title if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks' -- 'start-box-link-id' --> 'doc_editlinks' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = i18n['template-namespace-heading'] elseif subjectSpace == 828 then -- Module namespace data.heading = i18n['module-namespace-heading'] elseif subjectSpace == 6 then -- File namespace data.heading = i18n['file-namespace-heading'] else data.heading = i18n['other-namespaces-heading'] end -- Data for the [view][edit][history][purge] or [create] links. if links then data.linksClass = message('start-box-linkclasses') data.linksId = message('start-box-link-id') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox :addClass(message('header-div-class')) :tag('div') :addClass(message('heading-div-class')) :wikitext(data.heading) local links = data.links if links then sbox :tag('div') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. local cbox = mw.html.create('div') cbox :addClass(message('content-div-class')) :wikitext('\n' .. (content or '') .. '\n') return tostring(cbox) end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the footer text field. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') text = text .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates. if printBlurb then text = text .. '<br />' .. printBlurb end end end local ebox = mw.html.create('div') ebox :addClass(message('footer-div-class')) :wikitext(text) return tostring(ebox) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[w:Wikipedia:Template documentation|documentation]] -- is [[w:Wikipedia:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[w:Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle or args.content then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = i18n['edit-link-display'] local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = i18n['history-link-display'] local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = i18n['create-link-display'] local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end function p.makePrintBlurb(args, env) --[=[ -- Generates the blurb displayed when there is a print version of the template available. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'print-link-display' --> '/Print' -- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]' -- .. ' of this template exists at $1.' -- .. ' If you make a change to this template, please update the print version as well.' -- 'display-print-category' --> true -- 'print-category' --> 'Templates with print versions' --]=] local printTitle = env.printTitle if not printTitle then return nil end local ret if printTitle.exists then local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display')) ret = message('print-blurb', {printLink}) local displayPrintCategory = message('display-print-category', nil, 'boolean') if displayPrintCategory then ret = ret .. makeCategoryLink(message('print-category')) end end return ret end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p a029650bff998bd1a25784b49e99f984f068d85d Module:Documentation/config 828 51 173 2022-11-09T19:51:21Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:Documentation/config]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local _format = require('Module:TNT').format local function format(id) return _format('I18n/Documentation', id) end local cfg = {} -- Do not edit this line. cfg['templatestyles-scr'] = 'Module:Documentation/styles.css' ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-template'] -- The name of the template that displays the protection icon (a padlock on enwiki). cfg['protection-template'] = 'PP-template' -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ -- cfg['protection-template-args'] -- Any arguments to send to the protection template. This should be a Lua table. -- For example, if the protection template is "pp-template", and the wikitext template invocation -- looks like "{{pp-template|docusage=yes}}", then this table should look like "{docusage = 'yes'}". --]] cfg['protection-template-args'] = {docusage = 'yes'} --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[Image:Edit In Sandbox Icon - Color.svg|40px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = format('sandbox-notice-pagetype-template') cfg['sandbox-notice-pagetype-module'] = format('sandbox-notice-pagetype-module') cfg['sandbox-notice-pagetype-other'] = format('sandbox-notice-pagetype-other') --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = format('sandbox-notice-blurb') cfg['sandbox-notice-diff-blurb'] = format('sandbox-notice-diff-blurb') cfg['sandbox-notice-compare-link-display'] = format('sandbox-notice-compare-link-display') --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = format('sandbox-notice-testcases-blurb') cfg['sandbox-notice-testcases-link-display'] = format('sandbox-notice-testcases-link-display') cfg['sandbox-notice-testcases-run-blurb'] = format('sandbox-notice-testcases-run-blurb') cfg['sandbox-notice-testcases-run-link-display'] = format('sandbox-notice-testcases-run-link-display') -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = format('transcluded-from-blurb') --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = format('create-module-doc-blurb') ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = format('experiment-blurb-template') cfg['experiment-blurb-module'] = format('experiment-blurb-module') ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = format('sandbox-link-display') -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = format('sandbox-edit-link-display') -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = format('sandbox-create-link-display') -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = format('compare-link-display') -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = format('mirror-link-display') -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = format('testcases-link-display') -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = format('testcases-edit-link-display') -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = format('testcases-create-link-display') ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = format('add-categories-blurb') -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = format('subpages-blurb') --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = format('subpages-link-display') -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = format('template-pagetype') -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = format('module-pagetype') -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = format('default-pagetype') ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['file-docpage-preload'] -- Preload file for documentation page in the file namespace. cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- Print version configuration ---------------------------------------------------------------------------------------------------- -- cfg['print-subpage'] -- The name of the template subpage used for print versions. cfg['print-subpage'] = 'Print' -- cfg['print-link-display'] -- The text to display when linking to the /Print subpage. cfg['print-link-display'] = '/Print' -- cfg['print-blurb'] -- Text to display if a /Print subpage exists. $1 is a link to the subpage with a display value of cfg['print-link-display']. cfg['print-blurb'] = format('print-blurb') -- cfg['display-print-category'] -- Set to true to enable output of cfg['print-category'] if a /Print subpage exists. -- This should be a boolean value (either true or false). cfg['display-print-category'] = true -- cfg['print-category'] -- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists. cfg['print-category'] = 'Templates with print versions' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['main-div-id'] -- The "id" attribute of the main HTML "div" tag. cfg['main-div-id'] = 'template-documentation' -- cfg['main-div-classes'] -- The CSS classes added to the main HTML "div" tag. cfg['main-div-class'] = 'ts-doc-doc' cfg['header-div-class'] = 'ts-doc-header' cfg['heading-div-class'] = 'ts-doc-heading' cfg['content-div-class'] = 'ts-doc-content' cfg['footer-div-class'] = 'ts-doc-footer plainlinks' cfg['sandbox-class'] = 'ts-doc-sandbox' -- cfg['start-box-linkclasses'] -- The CSS classes used for the [view][edit][history] or [create] links in the start box. cfg['start-box-linkclasses'] = 'ts-tlinks-tlinks mw-editsection-like plainlinks' -- cfg['start-box-link-id'] -- The HTML "id" attribute for the links in the start box. cfg['start-box-link-id'] = 'doc_editlinks' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 79bc957b39b5b752fa4c2e2e80a35faa01901425 Module:Lua banner 828 62 189 2022-11-09T19:51:28Z meta>Agent Isai 0 1 revision imported from [[:wikipedia:Module:Lua_banner]]: Importing from [[w:|English Wikipedia]] to sync templates Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg) return TNT.format('I18n/Lua banner', msg) end local function getConfig() return mw.loadData('Module:Lua banner/config') end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args, cfg) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules, cfg) local trackingCategories = p.renderTrackingCategories(args, modules, nil, cfg) return box .. trackingCategories end function p.renderBox(modules, cfg) local boxArgs = {} if #modules < 1 then cfg = cfg or getConfig() if cfg['allow_wishes'] then boxArgs.text = format('wishtext') else boxArgs.text = string.format('<strong class="error">%s</strong>', format('error_emptylist')) end else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) end local moduleList = mList.makeList('bulleted', moduleLinks) boxArgs.text = format('header') .. '\n' .. moduleList end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = string.format( '[[File:Lua-logo-nolabel.svg|30px|alt=%s|link=%s]]', format('logo_alt'), format('logo_link') ) return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj, cfg) if yesno(args.nocat) then return '' end cfg = cfg or getConfig() local cats = {} -- Error category if #modules < 1 and not cfg['allow_wishes'] and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() if titleObj.namespace == 10 and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category if not category then local pagename = modules[1] and mw.title.new(modules[1]) category = pagename and cfg['module_categories'][pagename.text] if not category then if cfg['allow_wishes'] and #modules < 1 then category = cfg['wish_category'] else category = cfg['default_category'] end end end if category then cats[#cats + 1] = category end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 0fa5bd41f4b7ea898a70bc3d83af64846d0b0338 Module:Message box 828 9 153 2022-11-09T19:55:49Z meta>Agent Isai 0 Fix Scribunto text/plain require('Module:No globals') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) fd6a8b1a0ac5916465cdf2eb099825f1d006cfba Template:Literal translation 10 87 247 2022-11-12T17:32:00Z wikipedia>Est. 2021 0 as per talk, for consistency with lang-xx templates; tested in sandbox and testcases wikitext text/x-wiki {{#if:{{{sortable|}}} |<span style="display:none;">{{{1|}}}</span> }}{{#if:{{{i|}}} |<nowiki/>'' }}{{abbr|style=font-size:85%|{{#switch:{{{lk|}}} |yes|on = [[Literal translation|lit.]] |#default = lit. }}|literal translation}}{{#if:{{{i|}}} |''<nowiki/> }}{{#if:{{{1|}}} | {{thinsp}}<nowiki>'</nowiki>{{{1}}}{{#if:{{str endswith|{{{1}}}|''}}|{{'}}|&#39;}} }}{{#if:{{{2|}}} | {{sp}} or <nowiki>'</nowiki>{{{2}}}{{#if:{{str endswith|{{{2}}}|''}}|{{'}}|&#39;}} }}{{#if:{{{3|}}} | {{sp}} or <nowiki>'</nowiki>{{{3}}}{{#if:{{str endswith|{{{3}}}|''}}|{{'}}|&#39;}} }}{{#if:{{{4|}}} | {{sp}} or <nowiki>'</nowiki>{{{4}}}{{#if:{{str endswith|{{{4}}}|''}}|{{'}}|&#39;}} }}<noinclude> {{Documentation}} </noinclude> 1a7e9904a6e7bb60117c687c5c373fb9cf76c44c Template:Suppress categories 10 67 131 2022-11-26T18:00:01Z wikipedia>MusikBot II 0 Changed protection settings for "[[Template:Suppress categories]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 2612 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) wikitext text/x-wiki <includeonly>{{{{{|safesubst:}}}#invoke:Suppress categories|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 1f9c6065201d31d4c70f982129b5babbb809ae8c Template:Plainlist/styles.css 10 235 581 2022-12-11T06:59:53Z wikipedia>Izno 0 add this reset from mobile.css sanitized-css text/css /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Template:Plainlist 10 169 445 2022-12-12T22:45:26Z wikipedia>Izno 0 add tstyles here wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> 582fe7098c25c1ecfc0ad32f62ecd674ebe2bdf0 Module:Shortcut 828 212 533 2022-12-13T23:41:34Z wikipedia>Izno 0 use module:list for plainlist, move templatestyles to module space Scribunto text/plain -- This module implements {{shortcut}}. -- Set constants local CONFIG_MODULE = 'Module:Shortcut/config' -- Load required modules local checkType = require('libraryUtil').checkType local yesno = require('Module:Yesno') local p = {} local function message(msg, ...) return mw.message.newRawMessage(msg, ...):plain() end local function makeCategoryLink(cat) return string.format('[[%s:%s]]', mw.site.namespaces[14].name, cat) end function p._main(shortcuts, options, frame, cfg) checkType('_main', 1, shortcuts, 'table') checkType('_main', 2, options, 'table', true) options = options or {} frame = frame or mw.getCurrentFrame() cfg = cfg or mw.loadData(CONFIG_MODULE) local templateMode = options.template and yesno(options.template) local redirectMode = options.redirect and yesno(options.redirect) local isCategorized = not options.category or yesno(options.category) ~= false -- Validate shortcuts for i, shortcut in ipairs(shortcuts) do if type(shortcut) ~= 'string' or #shortcut < 1 then error(message(cfg['invalid-shortcut-error'], i), 2) end end -- Make the list items. These are the shortcuts plus any extra lines such -- as options.msg. local listItems = {} for i, shortcut in ipairs(shortcuts) do local templatePath, prefix if templateMode then -- Namespace detection local titleObj = mw.title.new(shortcut, 10) if titleObj.namespace == 10 then templatePath = titleObj.fullText else templatePath = shortcut end prefix = options['pre' .. i] or options.pre or '' end if options.target and yesno(options.target) then listItems[i] = templateMode and string.format("&#123;&#123;%s[[%s|%s]]&#125;&#125;", prefix, templatePath, shortcut) or string.format("[[%s]]", shortcut) else listItems[i] = frame:expandTemplate{ title = 'No redirect', args = templateMode and {templatePath, shortcut} or {shortcut, shortcut} } if templateMode then listItems[i] = string.format("&#123;&#123;%s%s&#125;&#125;", prefix, listItems[i]) end end end table.insert(listItems, options.msg) -- Return an error if we have nothing to display if #listItems < 1 then local msg = cfg['no-content-error'] msg = string.format('<strong class="error">%s</strong>', msg) if isCategorized and cfg['no-content-error-category'] then msg = msg .. makeCategoryLink(cfg['no-content-error-category']) end return msg end local root = mw.html.create() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Shortcut/styles.css'} }) -- Anchors local anchorDiv = root :tag('div') :addClass('module-shortcutanchordiv') for i, shortcut in ipairs(shortcuts) do local anchor = mw.uri.anchorEncode(shortcut) anchorDiv:tag('span'):attr('id', anchor) end -- Shortcut heading local shortcutHeading do local nShortcuts = #shortcuts if nShortcuts > 0 then local headingMsg = options['shortcut-heading'] or redirectMode and cfg['redirect-heading'] or cfg['shortcut-heading'] shortcutHeading = message(headingMsg, nShortcuts) shortcutHeading = frame:preprocess(shortcutHeading) end end -- Shortcut box local shortcutList = root :tag('div') :addClass('module-shortcutboxplain noprint') :attr('role', 'note') if options.float and options.float:lower() == 'left' then shortcutList:addClass('module-shortcutboxleft') end if options.clear and options.clear ~= '' then shortcutList:css('clear', options.clear) end if shortcutHeading then shortcutList :tag('div') :addClass('module-shortcutlist') :wikitext(shortcutHeading) end local ubl = require('Module:List').unbulleted(listItems) shortcutList:wikitext(ubl) return tostring(root) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) -- Separate shortcuts from options local shortcuts, options = {}, {} for k, v in pairs(args) do if type(k) == 'number' then shortcuts[k] = v else options[k] = v end end -- Compress the shortcut array, which may contain nils. local function compressArray(t) local nums, ret = {}, {} for k in pairs(t) do nums[#nums + 1] = k end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end shortcuts = compressArray(shortcuts) return p._main(shortcuts, options, frame) end return p 03fd46a265e549852a9ed3d3a9249b247d84cb4f Template:Mbox 10 101 275 2022-12-18T05:46:16Z wikipedia>TadejM 0 wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5bfb2becf8bed35974b47e3ff8660dc14bee40c7 Module:Infobox/styles.css 828 18 167 33 2022-12-20T18:53:25Z meta>MacFan4000 0 Fix - admins: please do not reimport this page as there are more styles here then on wikipedia sanitized-css text/css .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } /* Infobox template style */ .infobox { border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; font-size: 88%; line-height: 1.5em; width: 22em; } .infobox-header, .infobox-label, .infobox-above, .infobox-full-data, .infobox-data, .infobox-below, .infobox-subheader, .infobox-image, .infobox-navbar, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { vertical-align: top; } .infobox-label, .infobox-data, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { /* @noflip */ text-align: left; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-above, .infobox .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { font-size: 125%; font-weight: bold; text-align: center; } .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { padding: 0.2em; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-header, .infobox .infobox-subheader, .infobox .infobox-image, .infobox .infobox-full-data, .infobox .infobox-below { text-align: center; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-navbar { /* @noflip */ text-align: right; } eb850346855e4c081e692209d188b8432a2378d4 Template:Hlist/styles.css 10 73 143 2022-12-26T18:00:17Z wikipedia>Izno 0 actually remove that block, someone can dig for authorship text text/plain /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Template:Flatlist 10 175 457 2022-12-29T17:46:45Z wikipedia>Izno 0 templatestyles obviates the need for hlist-separated wikitext text/x-wiki <templatestyles src="Hlist/styles.css"/><div class="hlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> cf60aa4aef920d48fa394e786f72fe5f6dcd3169 Module:Navbox/configuration 828 180 467 2022-12-29T18:14:27Z wikipedia>Izno 0 get these in Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Template:Documentation subpage 10 54 181 2023-01-17T03:06:00Z meta>BrandonWM 0 and this wikitext text/x-wiki <includeonly>{{#if:{{IsDocSubpage|override={{{override|doc}}}}} | <!--doc subpage--></includeonly>{{#ifeq:{{{doc-notice|show}}}|show | {{Ombox|type=notice|image=[[File:Edit-copy green.svg|40px|link=]] |text='''This is a documentation [[mw:Help:Subpages|subpage]] for {{#if:{{{1|}}} | {{{1}}} | [[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]] }}.'''<br/> It contains usage information, categories, and other content that is not part of the original<!-- --> {{#if: {{{text2|}}} | {{{text2|}}} | {{#if: {{{text1|}}} | {{{text1|}}} | {{#ifeq: {{SUBJECTSPACE}} | {{ns:User}} | {{lc:{{SUBJECTSPACE}}}} template page | {{#if: {{SUBJECTSPACE}} | {{lc:{{SUBJECTSPACE}}}} page | article }} }} }} }}. }} <!--If not on a doc subpage, do nothing-->}}{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}{{#if: {{{inhibit|}}} | <!--Skip--> | <includeonly>{{#ifexist: {{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch: {{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Template }} documentation pages{{#translation:}}]] | [[Category:Documentation subpages without corresponding pages{{#translation:}}]] }}</includeonly> }}<includeonly> }}</includeonly><noinclude>{{Documentation}}<!--Add categories and interwikis to the /doc subpage, not here!--></noinclude> 2fcb7e4e2d233f798b114d37652fc333213f5ea7 105 2023-04-29T17:27:17Z wikipedia>Paine Ellsworth 0 m wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 41ca90af0945442788a2dbd08c8c54a61a23c057 Template:Notice 10 114 301 2023-01-25T22:32:14Z wikipedia>Izno 0 per tper wikitext text/x-wiki {{Mbox | name = Notice | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = notice | image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice|alt={{{imagealt|}}}]]}} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice|alt={{{imagealt|}}}]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}<noinclude> {{Documentation}} </noinclude> 2cbdbb721ca517005f6827650eef5b0f17537a43 Template:Distinguish 10 26 49 2023-02-04T21:16:13Z wikipedia>Hog Farm 0 [[Wikipedia:Templates for discussion/Log/2023 February 4#Template:Distinguish]] closed as keep ([[WP:XFDC#4.0.13|XFDcloser]]) wikitext text/x-wiki {{#invoke:Distinguish|distinguish}}<noinclude><!-- splitting these lines causes {{Documentation}} template to terminate green shading when Distinguish is used in /doc pages. --> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis to Wikidata, not here! --> </noinclude> f949a4cbfd6eb0ab77b832e69059a40a964b1fd8 Module:Exponential search 828 103 279 2023-02-10T20:10:53Z wikipedia>Uzume 0 strict Scribunto text/plain -- This module provides a generic exponential search algorithm. require[[strict]] local checkType = require('libraryUtil').checkType local floor = math.floor local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2) end local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1 == upper then return i end lower = i if upper then i = midPoint(lower, upper) else i = i * 2 end return search(testFunc, i, lower, upper) else upper = i i = midPoint(lower, upper) return search(testFunc, i, lower, upper) end end return function (testFunc, init) checkType('Exponential search', 1, testFunc, 'function') checkType('Exponential search', 2, init, 'number', true) if init and (init < 1 or init ~= floor(init) or init == math.huge) then error(string.format( "invalid init value '%s' detected in argument #2 to " .. "'Exponential search' (init value must be a positive integer)", tostring(init) ), 2) end init = init or 2 if not testFunc(1) then return nil end return search(testFunc, init, 1, nil) end a9037be0c44536be79b2d7a26155bfb907368ae7 Module:Lua banner 828 62 121 2023-02-16T14:39:53Z wikipedia>Uzume 0 [[Module:Citation]] has been blanked since [[Wikipedia:Templates for discussion/Log/2018 May 13#Module:Citation]]; remove special handling Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Module:Shortcut/styles.css 828 236 583 2023-03-14T15:53:59Z wikipedia>Izno 0 Undid revision 1144571295 by [[Special:Contributions/TheDJ|TheDJ]] ([[User talk:TheDJ|talk]]) I'm sorry, that's not what we discussed or agreed to sanitized-css text/css /* {{pp-template}} */ .module-shortcutboxplain { float: right; margin: 0 0 0 1em; border: 1px solid #aaa; background: #fff; padding: 0.3em 0.6em 0.2em 0.6em; text-align: center; font-size: 85%; } .module-shortcutboxleft { float: left; margin: 0 1em 0 0; } .module-shortcutlist { display: inline-block; border-bottom: 1px solid #aaa; margin-bottom: 0.2em; } .module-shortcutboxplain ul { font-weight: bold; } .module-shortcutanchordiv { position: relative; top: -3em; } li .module-shortcutanchordiv { float: right; /* IE/Edge in list items */ } .mbox-imageright .module-shortcutboxplain { padding: 0.4em 1em 0.4em 1em; line-height: 1.3; margin: 0; } ccf3877e4b14726147d3b1d8a297fbecacdb2cf8 Module:Sidebar/configuration 828 42 81 2023-03-14T22:32:24Z wikipedia>Izno 0 add hlist and plainlist_templatestyles keys Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = 'Module:Sidebar/styles.css', hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content' } } } dc2a980ac2162a898f7c21e6d6ba7e994dfeb315 Module:Sidebar 828 41 79 2023-03-14T22:35:53Z wikipedia>Izno 0 move these items to config, discovered during work at meta Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function hasSubgroup(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.plainlist_templatestyles) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.hlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.hlist_templatestyles} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleclass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then root :tag('tr') :tag('td') :addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup or cfg.i18n.class.content) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles } } local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (child and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 71fe765846593e025ca2f94371315e9dbb5bb4d2 Help:Infobox/user style 12 71 139 2023-04-03T14:00:08Z wikipedia>Maddy from Celeste 0 blatant self-promotion wikitext text/x-wiki {{{heading| ==Infoboxes and user style == }}} Users can have [[WP:User style|user CSS]] that hides<!--, moves, or makes collapsible--> any infoboxes in their own browsers. To hide all infoboxes, add the following to [[Special:MyPage/common.css]] (for all [[WP:Skin|skins]], or [[Special:MyPage/skin.css]] for just the current skin), on a line by itself: <syntaxhighlight lang="css">div.mw-parser-output .infobox { display: none; }</syntaxhighlight> Alternatively, you can add the following code to [[Special:MyPage/common.js|your common.js]] or into a browser user script that is executed by an extension like [[Greasemonkey]]: <syntaxhighlight lang="js">$('.infobox').hide();</syntaxhighlight> Be aware that although{{#if:{{{guideline|}}}||, per [[WP:Manual of Style/Infoboxes]],}} all information in an infobox ideally should also be found in the main body of an article, there isn't perfect compliance with this guideline. For example, the full taxonomic hierarchy in {{tlx|Taxobox}}, and the OMIM and other medical database codes of {{tlx|Infobox disease}} are often not found in the main article content. The infobox is also often the location of the most significant, even only, image in an article. There is a userscript which removes infoboxes but moves the images contained to separate thumbnails: [[User:Maddy from Celeste/disinfobox.js]].<!-- Needs Special:Mypage/common.js options for: * Making infoboxes collapsible ** Making them auto-collapsed * Moving infoboxes to bottom of page --><noinclude> {{Documentation|content= This documentation snippet is transcluded at [[Help:Infobox]], [[Template:Infobox/doc]], [[WP:Customisation#Hiding specific messages]], [[Help:User style]], [[WP:Manual of Style/Infoboxes]], and other places where this information is relevant. As a template, this snippet takes a {{para|heading}} parameter to replace the level-2 <code>==Infoboxes and user style==</code> section heading code, as needed. E.g., for a <code>=== ... ===</code> level-3 heading: <code><nowiki>heading={{=}}{{=}}{{=}}Infoboxes and user style{{=}}{{=}}{{=}}</nowiki></code> }} </noinclude> ba4dac68eb2bdc49a32f2a11b9afd52381bf06b5 Module:LuaCall 828 230 571 2023-04-04T19:01:48Z wikipedia>Lemondoge 0 Modified code formatting Scribunto text/plain local p={} function p.main(frame) local parent = frame.getParent(frame) or {} local reserved_value = {} local reserved_function, reserved_contents for k, v in pairs(parent.args or {}) do _G[k] = tonumber(v) or v -- transfer every parameter directly to the global variable table end for k, v in pairs(frame.args or {}) do _G[k] = tonumber(v) or v -- transfer every parameter directly to the global variable table end --- Alas Scribunto does NOT implement coroutines, according to --- http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format --- this will not stop us from trying to implement one single lousy function call if _G[1] then reserved_function, reserved_contents = mw.ustring.match(_G[1], "^%s*(%a[^%s%(]*)%(([^%)]*)%)%s*$") end if reserved_contents then local reserved_counter = 0 repeat reserved_counter = reserved_counter + 1 reserved_value[reserved_counter] = _G[mw.ustring.match(reserved_contents, "([^%,]+)")] reserved_contents = mw.ustring.match(reserved_contents, "[^%,]+,(.*)$") until not reserved_contents end local reserved_arraypart = _G while mw.ustring.match(reserved_function, "%.") do reserved_functionpart, reserved_function = mw.ustring.match(reserved_function, "^(%a[^%.]*)%.(.*)$") reserved_arraypart = reserved_arraypart[reserved_functionpart] end local reserved_call = reserved_arraypart[reserved_function] if type(reserved_call) ~= "function" then return tostring(reserved_call) else reserved_output = {reserved_call(unpack(reserved_value))} return reserved_output[reserved_return or 1] end end local function tonumberOrString(v) return tonumber(v) or v:gsub("^\\", "", 1) end local function callWithTonumberOrStringOnPairs(f, ...) local args = {} for _, v in ... do table.insert(args, tonumberOrString(v)) end return (f(unpack(args))) end --[[ ------------------------------------------------------------------------------------ -- ipairsAtOffset -- This is an iterator for arrays. It can be used like ipairs, but with -- specified i as first index to iterate. i is an offset from 1 -- ------------------------------------------------------------------------------------ --]] local function ipairsAtOffset(t, i) local f, s, i0 = ipairs(t) return f, s, i0+i end local function get(s) local G = _G; for _ in mw.text.gsplit( mw.text.trim(s, '%s'), '%s*%.%s*' ) do G = G[_] end return G end --[[ ------------------------------------------------------------------------------------ -- call -- -- This function is usually useful for debugging template parameters. -- Prefix parameter with backslash (\) to force interpreting parameter as string. -- The leading backslash will be removed before passed to Lua function. -- -- Example: -- {{#invoke:LuaCall|call|mw.log|a|1|2|3}} will return results of mw.log('a', 1, 2, 3) -- {{#invoke:LuaCall|call|mw.logObject|\a|321|\321| \321 }} will return results of mw.logObject('a', 321, '321', ' \\321 ') -- -- This example show the debugging to see which Unicode characters are allowed in template parameters, -- {{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0061}}}} return 97 -- {{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0000}}}} return 65533 -- {{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0001}}}} return 65533 -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0002}}}}}} return 0xfffd -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x007e}}}}}} return 0x007e -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x007f}}}}}} return 0x007f -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0080}}}}}} return 0x0080 -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x00a0}}}}}} return 0x00a0 -- ------------------------------------------------------------------------------------ --]] function p.call(frame) return callWithTonumberOrStringOnPairs(get(frame.args[1]), ipairsAtOffset(frame.args, 1) ) end --local TableTools = require('Module:TableTools') --[[ ------------------------------------------------------------------------------------ -- get -- -- Example: -- {{#invoke:LuaCall|get| math.pi }} will return value of math.pi -- {{#invoke:LuaCall|get|math|pi}} will return value of math.pi -- {{#invoke:LuaCall|get| math |pi}} will return value of _G[' math '].pi -- {{#invoke:LuaCall|get|_G| math.pi }} will return value of _G[' math.pi '] -- {{#invoke:LuaCall|get|obj.a.5.c}} will return value of obj.a['5'].c -- {{#invoke:LuaCall|get|obj|a|5|c}} will return value of obj.a[5].c -- ------------------------------------------------------------------------------------ --]] function p.get(frame) -- #frame.args always return 0, regardless of number of unnamed -- template parameters, so check manually instead if frame.args[2] == nil then -- not do tonumber() for this args style, -- always treat it as string, -- so 'obj.1' will mean obj['1'] rather obj[1] return get(frame.args[1]) else local G = _G for _, v in ipairs(frame.args) do G = G[tonumberOrString(v)] end return G end end --[[ ------------------------------------------------------------------------------------ -- invoke -- -- This function is used by Template:Invoke -- ------------------------------------------------------------------------------------ --]] function p.invoke(frame) local pframe, usedpargs = frame:getParent(), {} -- get module and function names from parent args if not provided local pfargs = setmetatable({frame.args[1], frame.args[2]}, {__index = table}) if not pfargs[1] then pfargs[1], usedpargs[1] = pframe.args[1], true if not pfargs[2] then pfargs[2], usedpargs[2] = pframe.args[2], true end elseif not pfargs[2] then pfargs[2], usedpargs[1] = pframe.args[1], true end -- repack sequential args for i, v in ipairs(pframe.args) do if not usedpargs[i] then pfargs:insert(v) usedpargs[i] = true end end -- copy other args for k, v in pairs(pframe.args) do if not pfargs[k] and not usedpargs[k] then pfargs[k], usedpargs[k] = v, true end end -- #invoke off parent frame so the new frame has the same parent return pframe:callParserFunction{name = '#invoke', args = pfargs} end return p d6ec342627682bf90e61bbad921fcc6190f2e090 Template:Uses TemplateStyles 10 80 549 197 2023-04-18T22:22:16Z wikipedia>Grufo 0 Move the preview inside the documentation wikitext text/x-wiki <includeonly>{{#invoke:Uses TemplateStyles|main}}</includeonly><noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 60f2fc73c4d69b292455879f9fcb3c68f6c63c2a Module:Protection banner/config 828 40 77 2023-05-08T11:41:01Z wikipedia>Fayenatic london 0 Update categories from "fully-protected" to "fully protected", removing hyphen, per valid request at [[WP:CFDS]] Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } a20552ae38cb5253a4fa29aa126abc74215a589f Template:HTML lists 10 227 565 2023-05-14T11:58:14Z wikipedia>GhostInTheMachine 0 Change "other" wikitext text/x-wiki {{navbox top |name= HTML lists |title=HTML lists |state=<includeonly>collapsed</includeonly> |above = More information: {{hlist | [[Help:List]] | [[WP:List dos and don'ts]] | [[WP:Manual of Style/Embedded lists]] | {{section link|WP:Manual of Style/Accessibility#Lists}} | [[WP:WikiProject Lists]] }} }} {|style="width:100%" | style="vertical-align:top; width:32%" | {| class="wikitable" style="width:100%" |- ! Horizontal list |- | {{mono|{{tl|hlist}}}} |- | {{tlx|hlist |item1&nbsp;|item2&nbsp;|...}} |- | {{hlist |item1 |item2 |...}} |} | rowspan=4 style="width:2%"| | style="vertical-align:top; width:32%"| {| class="wikitable" style="width:100%" |- ! Horizontal list |- | {{mono|{{tl|flatlist}}}} |- | {{tlx|flatlist|<br />* item1<br />* item2<br />* ...}} |- | {{flatlist| * item1 * item2 * ... }} |} | rowspan=4 style="width:2%" | | style="vertical-align:top; width:32%"| {| class="wikitable" style="width:100%" |- ! Horizontal list |- | {{mono|{{tl|cslist}}}} |- | {{tlx|cslist |item1&nbsp;|item2&nbsp;|...}} |- | {{cslist |item1 |item2 |...}} |- !style="font-weight: normal; text-align:center;" | {{mono|{{tl|bold list}}}} |- | {{tlx|bold list |item1&nbsp;|item2&nbsp;|...}} |- | {{bold list |item1 |item2 |...}} |} |- | style="vertical-align:top;"| {| class="wikitable" style="width:100%" |- ! Bulleted list |- | {{mono|{{tl|bulleted list}}}} |- | {{tlx|bulleted list |item1&nbsp;|item2&nbsp;|...}} |- | {{bulleted list |item1 |item2 |...}} |} | style="vertical-align:top;"| {| class="wikitable" style="width:100%" |- ! Numeric ordered list |- | {{mono|{{tl|ordered list}}}} |- | {{tlx|Ordered list |first&nbsp;|second&nbsp;|...}} |- | {{Ordered list |first |second |...}} |} | style="vertical-align:top;"| {| class="wikitable" style="width:100%" |- ! Alphabetic ordered list |- | {{mono|{{tl|ordered list}}}} |- | {{tlx|Ordered list |list_style_type{{=}}lower-alpha&nbsp;|first&nbsp;|second&nbsp;|...}} |- | {{Ordered list |list_style_type=lower-alpha |first |second |...}} |} |- | style="vertical-align:top"| {| class="wikitable" style="width:100%" |- ! Unbulleted list |- | {{mono|{{tl|unbulleted list}}}} |- | {{tlx|unbulleted list |item1&nbsp;|item2&nbsp;|...}} |- | {{unbulleted list|item1|item2|...}} |} | style="vertical-align:top"| {| class="wikitable" style="width:100%" |- ! Unbulleted list |- | {{mono|{{tl|plainlist}}}} |- | {{tlx|plainlist|<br />* item1<br />* item2<br />* ...}} |- | {{plainlist| * item1 * item2 * ... }} |} | style="vertical-align:top" rowspan=2| {| class="wikitable" style="width:100%" |- ! Glossary or definition list |- | {{mono|{{tl|glossary}}}}<br />([[Wikipedia:Manual of Style/Glossaries|glossary]], description, definition, association) |- | {{tlx|glossary}}<br /> {{tlx|term|first term}}{{tlx|defn|first description}}<br /> {{tnull|term|second term}}{{tnull|defn|second description}}<br /> {{tnull|term|...}}{{tnull|defn|....}}<br /> {{mono|{{tl|glossary end}}}} |- | {{glossary}} {{term|first term}}{{defn|first description}} {{term|second term}}{{defn|second description}} {{term|...}}{{defn|....}} {{glossary end}} |} |- | style="vertical-align:top"| {| class="wikitable" style="width:100%" |- ! Bulleted list to flow around an image |- | {{mono|{{tl|flowlist}}}} |- | <code><nowiki>[[File:Bad Title Example.png|left|thumb|100px]]</nowiki></code><br /> {{tlx|flowlist|<br />*item1<br />*item2<br />*...}} |- | [[File:Bad Title Example.png|left|thumb|100px]] {{flowlist| *item1 *item2 *... }} |} | style="vertical-align:top"| {| class="wikitable" style="width:100%" |- ! Ordered list in columns |- | {{mono|{{tl|columns-list}}}} |- | {{tlx|columns-list|colwidth{{=}}5em|<br /># first<br /># second<br /># third<br /># ...}} |- | {{columns-list|colwidth=5em| # first # second # third # ... }} |} | style="vertical-align:top"| |} {{navbox bottom |below = {{cl|List formatting and function templates‎}} }}<noinclude> {{documentation}} <!-- Please add categories to the /doc subpage; interwikis go to Wikidata --> </noinclude> bc8771283bcdc7d736cca9716beebac6300dd812 Module:TNT 828 76 175 2023-05-20T18:33:54Z meta>Dmehus 0 Undid revision 335077 by [[Special:Contributions/Dmehus|Dmehus]] ([[User talk:Dmehus|talk]]) Revert. Did not fix it Scribunto text/plain -- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT -- Please do not modify it anywhere else, as it may get copied and override your changes. -- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT -- -- DESCRIPTION: -- The "msg" function uses a Commons dataset to translate a message -- with a given key (e.g. source-table), plus optional arguments -- to the wiki markup in the current content language. -- Use lang=xx to set language. Example: -- -- {{#invoke:TNT | msg -- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --> -- | source-table <!-- uses a translation message with id = "source-table" --> -- | param1 }} <!-- optional parameter --> -- -- -- The "doc" function will generate the <templatedata> parameter documentation for templates. -- This way all template parameters can be stored and localized in a single Commons dataset. -- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons. -- -- {{#invoke:TNT | doc | Graph:Lines }} -- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab -- if the current page is Template:Graph:Lines/doc -- local p = {} local i18nDataset = 'I18n/Module:TNT.tab' -- Forward declaration of the local functions local sanitizeDataset, loadData, link, formatMessage function p.msg(frame) local dataset, id local params = {} local lang = nil for k, v in pairs(frame.args) do if k == 1 then dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then params[k - 2] = mw.text.trim(v) elseif k == 'lang' and v ~= '_' then lang = mw.text.trim(v) end end return formatMessage(dataset, id, params, lang) end -- Identical to p.msg() above, but used from other lua modules -- Parameters: name of dataset, message key, optional arguments -- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.format(dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('format', 1, dataset, 'string') checkType('format', 2, key, 'string') return formatMessage(dataset, key, {...}) end -- Identical to p.msg() above, but used from other lua modules with the language param -- Parameters: language code, name of dataset, message key, optional arguments -- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.formatInLanguage(lang, dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('formatInLanguage', 1, lang, 'string') checkType('formatInLanguage', 2, dataset, 'string') checkType('formatInLanguage', 3, key, 'string') return formatMessage(dataset, key, {...}, lang) end -- Obsolete function that adds a 'c:' prefix to the first param. -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' function p.link(frame) return link(frame.args[1]) end function p.doc(frame) local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1]) return frame:extensionTag('templatedata', p.getTemplateData(dataset)) .. formatMessage(i18nDataset, 'edit_doc', {link(dataset)}) end function p.getTemplateData(dataset) -- TODO: add '_' parameter once lua starts reindexing properly for "all" languages local data = loadData(dataset) local names = {} for _, field in ipairs(data.schema.fields) do table.insert(names, field.name) end local params = {} local paramOrder = {} for _, row in ipairs(data.data) do local newVal = {} local name = nil for pos, columnName in ipairs(names) do if columnName == 'name' then name = row[pos] else newVal[columnName] = row[pos] end end if name then params[name] = newVal table.insert(paramOrder, name) end end -- Work around json encoding treating {"1":{...}} as an [{...}] params['zzz123']='' local json = mw.text.jsonEncode({ params=params, paramOrder=paramOrder, description=data.description }) json = string.gsub(json,'"zzz123":"",?', "") return json end -- Local functions sanitizeDataset = function(dataset) if not dataset then return nil end dataset = mw.text.trim(dataset) if dataset == '' then return nil elseif string.sub(dataset,-4) ~= '.tab' then return dataset .. '.tab' else return dataset end end loadData = function(dataset, lang) dataset = sanitizeDataset(dataset) if not dataset then error(formatMessage(i18nDataset, 'error_no_dataset', {})) end -- Give helpful error to thirdparties who try and copy this module. if not mw.ext or not mw.ext.data or not mw.ext.data.get then error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset) end local data = mw.ext.data.get(dataset, lang) if data == false then if dataset == i18nDataset then -- Prevent cyclical calls error('Missing Commons dataset ' .. i18nDataset) else error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)})) end end return data end -- Given a dataset name, convert it to a title with the 'commons:data:' prefix link = function(dataset) return 'c:Data:' .. mw.text.trim(dataset or '') end formatMessage = function(dataset, key, params, lang) for _, row in pairs(loadData(dataset, lang).data) do local id, msg = unpack(row) if id == key then local result = mw.message.newRawMessage(msg, unpack(params or {})) return result:plain() end end if dataset == i18nDataset then -- Prevent cyclical calls error('Invalid message key "' .. key .. '"') else error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)})) end end return p 2c570369c78089aef29c72768918373f61b7075d Template:Cascade-protected template 10 225 561 2023-05-27T10:47:46Z wikipedia>Materialscientist 0 Reverted edits by [[Special:Contribs/Pregnant Ericka|Pregnant Ericka]] ([[User talk:Pregnant Ericka|talk]]) to last version by JsfasdF252 wikitext text/x-wiki {{mbox | type = protection | textstyle = font-weight:bold; font-size:130%; | image = [[File:Cascade-protection-shackle.svg|40x40px|link=|alt=]] | text = <div style="text-align: center;">This {{{page|template}}} is [[Wikipedia:Transclusion|transcluded]] in one or more [[Wikipedia:Protection policy#Cascading protection|cascade-protected]] pages, so only [[Wikipedia:Administrators|administrators]] can edit it.</div> }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> 364e1b949a303bad9181218b6a19d3f3b9e0626d Module:Navbox 828 179 465 2023-05-28T13:26:56Z wikipedia>Uzume 0 strict Scribunto text/plain require('strict') local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 05be9a97c035ab3f0fac69423779e261949d473c Template:High-use 10 57 111 2023-05-30T09:39:48Z wikipedia>Lectonar 0 Changed protection settings for "[[Template:High-use]]": [[WP:High-risk templates|High-risk template or module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> a3322d1bd47ac03df14fa2090855cff4fede9bc7 Module:Transclusion count 828 61 119 2023-05-30T20:51:38Z wikipedia>Isabelle Belato 0 Changed protection settings for "[[Module:Transclusion count]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Module:Format TemplateData 828 223 557 2023-06-26T23:07:36Z wikipedia>Pppery 0 Remove [[Module:JSONutil]] Scribunto text/plain local TemplateData = { suite = "TemplateData", serial = "2022-03-10", item = 46997995 } --[==[ improve template:TemplateData ]==] local Failsafe = TemplateData local Config = { -- multiple option names mapped into unique internal fields basicCnf = { catProblem = "strange", classMultiColumns = "selMultClm", classNoNumTOC = "suppressTOCnum", classTable = "classTable", cssParWrap = "cssTabWrap", cssParams = "cssTable", docpageCreate = "suffix", docpageDetect = "subpage", helpBoolean = "support4boolean", helpContent = "support4content", helpDate = "support4date", helpFile = "support4wiki-file-name", helpFormat = "supportFormat", helpLine = "support4line", helpNumber = "support4number", helpPage = "support4wiki-page-name", helpString = "support4string", helpTemplate = "support4wiki-template-name", helpURL = "support4url", helpUser = "support4wiki-user-name", msgDescMiss = "solo", tStylesTOCnum = "stylesTOCnum", tStylesMultiColumns = "stylesMultClm" }, classTable = { "wikitable" }, -- classes for params table debugmultilang = "C0C0C0", loudly = false, -- show exported element, etc. solo = false, -- complaint on missing description strange = false, -- title of maintenance category cssTable = false, -- styles for params table cssTabWrap = false, -- styles for params table wrapper debug = false, subpage = false, -- pattern to identify subpage suffix = false, -- subpage creation scheme suppressTOCnum = false, -- class for TOC number suppression jsonDebug = "json-code-lint" -- class for jsonDebug tool } local Data = { div = false, -- <div class="mw-templatedata-doc-wrap"> got = false, -- table, initial templatedata object heirs = false, -- table, params that are inherited jump = false, -- source position at end of "params" less = false, -- main description missing lasting = false, -- old syntax encountered lazy = false, -- doc mode; do not generate effective <templatedata> leading = false, -- show TOC -- low = false, -- 1= mode order = false, -- parameter sequence params = false, -- table, exported parameters scream = false, -- error messages sibling = false, -- TOC juxtaposed slang = nil, -- project/user language code slim = false, -- JSON reduced to plain source = false, -- JSON input strip = false, -- <templatedata> evaluation tag = false, -- table, exported root element title = false, -- page tree = false -- table, rewritten templatedata object } local Permit = { builder = { after = "block", align = "block", block = "block", compressed = "block", dense = "block", grouped = "inline", half = "inline", indent = "block", inline = "inline", last = "block", lead = "block", newlines = "*", spaced = "inline" }, colors = { bg = "FFFFFF", fg = "000000", tableheadbg = "B3B7FF", required = "EAF3FF", suggested = "FFFFFF", optional = "EAECF0", deprecated = "FFCBCB" }, params = { aliases = "table", autovalue = "string", default = "string table I18N nowiki", deprecated = "boolean string I18N", description = "string table I18N", example = "string table I18N nowiki", label = "string table I18N", inherits = "string", required = "boolean", style = "string table", suggested = "boolean", suggestedvalues = "string table number boolean", type = "string" }, root = { description = "string table I18N", format = "string", maps = "table", params = "table", paramOrder = "table", sets = "table" }, search = "[{,]%%s*(['\"])%s%%1%%s*:%%s*%%{", types = { boolean = true, content = true, date = true, line = true, number = true, string = true, unknown = true, url = true, ["wiki-file-name"] = true, ["wiki-page-name"] = true, ["wiki-template-name"] = true, ["wiki-user-name"] = true, ["unbalanced-wikitext"] = true, ["string/line"] = "line", ["string/wiki-page-name"] = "wiki-page-name", ["string/wiki-user-name"] = "wiki-user-name" } } local function Fault( alert ) -- Memorize error message -- Parameter: -- alert -- string, error message if Data.scream then Data.scream = string.format( "%s *** %s", Data.scream, alert ) else Data.scream = alert end end -- Fault() local function Fetch( ask, allow ) -- Fetch module -- Parameter: -- ask -- string, with name -- "/global" -- "Multilingual" -- "Text" -- "WLink" -- allow -- true: no error if unavailable -- Returns table of module -- error: Module not available local sign = ask local r, stem if sign:sub( 1, 1 ) == "/" then sign = TemplateData.frame:getTitle() .. sign else stem = sign sign = "Module:" .. stem end if TemplateData.extern then r = TemplateData.extern[ sign ] else TemplateData.extern = { } end if not r then local lucky, g = pcall( require, sign ) if type( g ) == "table" then if stem and type( g[ stem ] ) == "function" then r = g[ stem ]() else r = g end TemplateData.extern[ sign ] = r elseif not allow then error( string.format( "Fetch(%s) %s", sign, g ), 0 ) end end return r end -- Fetch() local function Foreign() -- Guess human language -- Returns slang, or not if type( Data.slang ) == "nil" then local Multilingual = Fetch( "Multilingual", true ) if Multilingual and type( Multilingual.userLangCode ) == "function" then Data.slang = Multilingual.userLangCode() else Data.slang = mw.language.getContentLanguage():getCode() :lower() end end if Data.slang and mw.ustring.codepoint( Data.slang, 1, 1 ) > 122 then Data.slang = false end return Data.slang end -- Foreign() local function facet( ask, at ) -- Find physical position of parameter definition in JSON -- Parameter: -- ask -- string, parameter name -- at -- number, physical position within definition -- Returns number, or nil local seek = string.format( Permit.search, ask:gsub( "%%", "%%%%" ) :gsub( "([%-.()+*?^$%[%]])", "%%%1" ) ) local i, k, r, slice, source if not Data.jump then Data.jump = Data.source:find( "params", 2 ) if Data.jump then Data.jump = Data.jump + 7 else Data.jump = 1 end end i, k = Data.source:find( seek, at + Data.jump ) while i and not r do source = Data.source:sub( k + 1 ) slice = source:match( "^%s*\"([^\"]+)\"s*:" ) if not slice then slice = source:match( "^%s*'([^']+)'%s*:" ) end if ( slice and Permit.params[ slice ] ) or source:match( "^%s*%}" ) then r = k else i, k = Data.source:find( seek, k ) end end -- while i return r end -- facet() local function facilities( apply ) -- Retrieve details of suggestedvalues -- Parameter: -- apply -- table, with plain or enhanced values -- .suggestedvalues -- table|string|number, or more -- Returns -- 1 -- table, with suggestedvalues -- 2 -- table, with CSS map, or not -- 3 -- string, with class, or not -- 4 -- string, with templatestyles, or not local elements = apply.suggestedvalues local s = type( elements ) local r1, r2, r3, r4 if s == "table" then local values = elements.values if type( values ) == "table" then r1 = values if type( elements.scroll ) == "string" then r2 = r2 or { } r2.height = apply.scroll r2.overflow = "auto" end if type( elements.minwidth ) == "string" then local s = type( elements.maxcolumns ) r2 = r2 or { } r2["column-width"] = elements.minwidth if s == "string" or s == "number" then s = tostring( elements.maxcolumns ) r2["column-count"] = s end if type( Config.selMultClm ) == "string" then r3 = Config.selMultClm end if type( Config.stylesMultClm ) == "string" then local src = Config.stylesMultClm .. "/styles.css" r4 = TemplateData.frame :extensionTag( "templatestyles", nil, { src = src } ) end end elseif elements and elements ~= "" then r1 = elements end elseif s == "string" then s = mw.text.trim( about ) if s ~= "" then r1 = { } table.insert( r1, { code = s } ) end elseif s == "number" then r1 = { } table.insert( r1, { code = tostring( elements ) } ) end return r1, r2, r3, r4 end -- facilities() local function factory( adapt ) -- Retrieve localized text from system message -- Parameter: -- adapt -- string, message ID after "templatedata-" -- Returns string, with localized text local o = mw.message.new( "templatedata-" .. adapt ) if Foreign() then o:inLanguage( Data.slang ) end return o:plain() end -- factory() local function faculty( adjust ) -- Test template arg for boolean -- adjust -- string or nil -- Returns boolean local s = type( adjust ) local r if s == "string" then r = mw.text.trim( adjust ) r = ( r ~= "" and r ~= "0" ) elseif s == "boolean" then r = adjust else r = false end return r end -- faculty() local function failures() -- Retrieve error collection and category -- Returns string local r if Data.scream then local e = mw.html.create( "span" ) :addClass( "error" ) :wikitext( Data.scream ) r = tostring( e ) mw.addWarning( "'''TemplateData'''<br />" .. Data.scream ) if Config.strange then r = string.format( "%s[[category:%s]]", r, Config.strange ) end else r = "" end return r end -- failures() local function fair( adjust ) -- Reduce text to one line of plain text, or noexport wikitext blocks -- adjust -- string -- Returns string, with adjusted text local f = function ( a ) return a:gsub( "%s*\n%s*", " " ) :gsub( "%s%s+", " " ) end local tags = { { start = "<noexport>", stop = "</noexport>" }, { start = "<exportonly>", stop = "</exportonly>", l = false } } local r = adjust local i, j, k, s, tag for m = 1, 2 do tag = tags[ m ] if r:find( tag.start, 1, true ) then s = r r = "" i = 1 tag.l = true j, k = s:find( tag.start, i, true ) while j do if j > 1 then r = r .. f( s:sub( i, j - 1 ) ) end i = k + 1 j, k = s:find( tag.stop, i, true ) if j then if m == 1 then r = r .. s:sub( i, j - 1 ) end i = k + 1 j, k = s:find( tag.start, i, true ) else Fault( "missing " .. tag.stop ) end end -- while j r = r .. s:sub( i ) elseif m == 1 then r = f( r ) end end -- for m if tags[ 2 ].l then r = r:gsub( "<exportonly>.*</exportonly>", "" ) end return r end -- fair() local function fancy( advance, alert ) -- Present JSON source -- Parameter: -- advance -- true, for nice -- alert -- true, for visible -- Returns string local r if Data.source then local support = Config.jsonDebug local css if advance then css = { height = "6em", resize = "vertical" } r = { [ 1 ] = "syntaxhighlight", [ 2 ] = Data.source, lang = "json", style = table.concat( css, ";" ) } if alert then r.class( support ) end r = TemplateData.frame:callParserFunction( "#tag", r ) else css = { [ "font-size" ] = "77%", [ "line-height" ] = "1.35" } if alert then css.resize = "vertical" else css.display = "none" end r = mw.html.create( "pre" ) :addClass( support ) :css( css ) :wikitext( mw.text.encode( Data.source ) ) r = tostring( r ) end r = "\n".. r else r = "" end return r end -- fancy() local function faraway( alternatives ) -- Retrieve best language version from multilingual text -- Parameter: -- alternatives -- table, to be evaluated -- Returns -- 1 -- string, with best match -- 2 -- table of other versions, if any local n = 0 local variants = { } local r1, r2 for k, v in pairs( alternatives ) do if type( v ) == "string" then v = mw.text.trim( v ) if v ~= "" and type( k ) == "string" then k = k:lower() variants[ k ] = v n = n + 1 end end end -- for k, v if n > 0 then local Multilingual = Fetch( "Multilingual", true ) if Multilingual and type( Multilingual.i18n ) == "function" then local show, slang = Multilingual.i18n( variants ) if show then r1 = show variants[ slang ] = nil r2 = variants end end if not r1 then Foreign() for k, v in pairs( variants ) do if n == 1 then r1 = v elseif Data.slang == k then variants[ k ] = nil r1 = v r2 = variants end end -- for k, v end if r2 and Multilingual then for k, v in pairs( r2 ) do if v and not Multilingual.isLang( k, true ) then Fault( string.format( "%s <code>lang=%s</code>", "Invalid", k ) ) end end -- for k, v end end return r1, r2 end -- faraway() local function fashioned( about, asked, assign ) -- Create description head -- Parameter: -- about -- table, supposed to contain description -- asked -- true, if mandatory description -- assign -- <block>, if to be equipped -- Returns <block>, with head, or nil local para = assign or mw.html.create( "div" ) local plus, r if about and about.description then if type( about.description ) == "string" then para:wikitext( about.description ) else para:wikitext( about.description[ 1 ] ) plus = mw.html.create( "ul" ) plus:css( "text-align", "left" ) for k, v in pairs( about.description[ 2 ] ) do plus:node( mw.html.create( "li" ) :node( mw.html.create( "code" ) :wikitext( k ) ) :node( mw.html.create( "br" ) ) :wikitext( fair( v ) ) ) end -- for k, v if Config.loudly then plus = mw.html.create( "div" ) :css( "background-color", "#" .. Config.debugmultilang ) :node( plus ) else plus:addClass( "templatedata-maintain" ) :css( "display", "none" ) end end elseif Config.solo and asked then para:addClass( "error" ) :wikitext( Config.solo ) Data.less = true else para = false end if para then if plus then r = mw.html.create( "div" ) :node( para ) :node( plus ) else r = para end end return r end -- fashioned() local function fatten( access ) -- Create table row for sub-headline -- Parameter: -- access -- string, with name -- Returns <tr> local param = Data.tree.params[ access ] local sub, sort = access:match( "(=+)%s*(%S.*)$" ) local headline = mw.html.create( string.format( "h%d", #sub ) ) local r = mw.html.create( "tr" ) local td = mw.html.create( "td" ) :attr( "colspan", "5" ) :attr( "data-sort-value", "!" .. sort ) local s if param.style then s = type( param.style ) if s == "table" then td:css( param.style ) elseif s == "string" then td:cssText( param.style ) end end s = fashioned( param, false, headline ) if s then headline = s else headline:wikitext( sort ) end td:node( headline ) r:node( td ) return r end -- fatten() local function fathers() -- Merge params with inherited values local n = 0 local p = Data.params local t = Data.tree.params local p2, t2 for k, v in pairs( Data.heirs ) do n = n + 1 end -- for k, v for i = 1, n do if Data.heirs then for k, v in pairs( Data.heirs ) do if v and not Data.heirs[ v ] then n = n - 1 t[ k ].inherits = nil Data.heirs[ k ] = nil p2 = { } t2 = { } if p[ v ] then for k2, v2 in pairs( p[ v ] ) do p2[ k2 ] = v2 end -- for k2, v2 if p[ k ] then for k2, v2 in pairs( p[ k ] ) do if type( v2 ) ~= "nil" then p2[ k2 ] = v2 end end -- for k2, v2 end p[ k ] = p2 for k2, v2 in pairs( t[ v ] ) do t2[ k2 ] = v2 end -- for k2, v2 for k2, v2 in pairs( t[ k ] ) do if type( v2 ) ~= "nil" then t2[ k2 ] = v2 end end -- for k2, v2 t[ k ] = t2 else Fault( "No params[] inherits " .. v ) end end end -- for k, v end end -- i = 1, n if n > 0 then local s for k, v in pairs( Data.heirs ) do if v then if s then s = string.format( "%s &#124; %s", s, k ) else s = "Circular inherits: " .. k end end end -- for k, v Fault( s ) end end -- fathers() local function favorize() -- Local customization issues local boole = { ["font-size"] = "125%" } local l, cx = pcall( mw.loadData, TemplateData.frame:getTitle() .. "/config" ) local scripting, style TemplateData.ltr = not mw.language.getContentLanguage():isRTL() if TemplateData.ltr then scripting = "left" else scripting = "right" end boole[ "margin-" .. scripting ] = "3em" Permit.boole = { [false] = { css = boole, lead = true, show = "&#x2610;" }, [true] = { css = boole, lead = true, show = "&#x2611;" } } Permit.css = { } for k, v in pairs( Permit.colors ) do if k == "tableheadbg" then k = "tablehead" end if k == "fg" then style = "color" else style = "background-color" end Permit.css[ k ] = { } Permit.css[ k ][ style ] = "#" .. v end -- for k, v if type( cx ) == "table" then local c, s if type( cx.permit ) == "table" then if type( cx.permit.boole ) == "table" then if type( cx.permit.boole[ true ] ) == "table" then Permit.boole[ false ] = cx.permit.boole[ false ] end if type( cx.permit.boole[ true ] ) == "table" then Permit.boole[ true ] = cx.permit.boole[ true ] end end if type( cx.permit.css ) == "table" then for k, v in pairs( cx.permit.css ) do if type( v ) == "table" then Permit.css[ k ] = v end end -- for k, v end end for k, v in pairs( Config.basicCnf ) do s = type( cx[ k ] ) if s == "string" or s == "table" then Config[ v ] = cx[ k ] end end -- for k, v end if type( Config.subpage ) ~= "string" or type( Config.suffix ) ~= "string" then local got = mw.message.new( "templatedata-doc-subpage" ) local suffix if got:isDisabled() then suffix = "doc" else suffix = got:plain() end if type( Config.subpage ) ~= "string" then Config.subpage = string.format( "/%s$", suffix ) end if type( Config.suffix ) ~= "string" then Config.suffix = string.format( "%%s/%s", suffix ) end end end -- favorize() local function feasible( all, at, about ) -- Deal with suggestedvalues within parameter -- Parameter: -- all -- parameter details -- .default -- .type -- at -- string, with parameter name -- about -- suggestedvalues -- table, -- value and possibly description -- table may have elements: -- .code -- mandatory -- .label -- table|string -- .support -- table|string -- .icon -- string -- .class -- table|string -- .css -- table -- .style -- string -- .less -- true: suppress code -- Returns -- 1: mw.html object <ul> -- 2: sequence table with values, or nil local h = { } local e, r1, r2, s, v if #about > 0 then for i = 1, #about do e = about[ i ] s = type( e ) if s == "table" then if type( e.code ) == "string" then s = mw.text.trim( e.code ) if s == "" then e = nil else e.code = s end else e = nil s = string.format( "params.%s.%s[%d] %s", at, "suggestedvalues", i, "MISSING 'code:'" ) end elseif s == "string" then s = mw.text.trim( e ) if s == "" then e = nil s = string.format( "params.%s.%s[%d] EMPTY", at, "suggestedvalues", i ) Fault( s ) else e = { code = s } end elseif s == "number" then e = { code = tostring( e ) } else s = string.format( "params.%s.%s[%d] INVALID", at, "suggestedvalues", i ) Fault( s ) e = false end if e then v = v or { } table.insert( v, e ) if h[ e.code ] then s = string.format( "params.%s.%s REPEATED %s", at, "suggestedvalues", e.code ) Fault( s ) else h[ e.code ] = true end end end -- for i else Fault( string.format( "params.%s.suggestedvalues %s", at, "NOT AN ARRAY" ) ) end if v then local code, d, k, less, story, swift, t, u r1 = mw.html.create( "ul" ) r2 = { } for i = 1, #v do u = mw.html.create( "li" ) e = v[ i ] table.insert( r2, e.code ) story = false less = ( e.less == true ) if not less then swift = e.code if e.support then local scream, support s = type( e.support ) if s == "string" then support = e.support elseif s == "table" then support = faraway( e.support ) else scream = "INVALID" end if support then s = mw.text.trim( support ) if s == "" then scream = "EMPTY" elseif s:find( "[%[%]|%<%>]" ) then scream = "BAD PAGE" else support = s end end if scream then s = string.format( "params.%s.%s[%d].support %s", at, "suggestedvalues", i, scream ) Fault( s ) else swift = string.format( "[[:%s|%s]]", support, swift ) end end if all.type:sub( 1, 5 ) == "wiki-" and swift == e.code then local rooms = { file = 6, temp = 10, user = 2 } local ns = rooms[ all.type:sub( 6, 9 ) ] or 0 t = mw.title.makeTitle( ns, swift ) if t and t.exists then swift = string.format( "[[:%s|%s]]", t.prefixedText, swift ) end end if e.code == all.default then k = 800 else k = 300 end code = mw.html.create( "code" ) :css( "font-weight", tostring( k ) ) :css( "white-space", "nowrap" ) :wikitext( swift ) u:node( code ) end if e.class then s = type( e.class ) if s == "string" then u:addClass( e.class ) elseif s == "table" then for k, s in pairs( e.class ) do u:addClass( s ) end -- for k, s else s = string.format( "params.%s.%s[%d].class INVALID", at, "suggestedvalues", i ) Fault( s ) end end if e.css then if type( e.css ) == "table" then u:css( e.css ) else s = string.format( "params.%s.%s[%d].css INVALID", at, "suggestedvalues", i ) Fault( s ) end end if e.style then if type( e.style ) == "string" then u:cssText( e.style ) else s = string.format( "params.%s.%s[%d].style INVALID", at, "suggestedvalues", i ) Fault( s ) end end if all.type == "wiki-file-name" and not e.icon then e.icon = e.code end if e.label then s = type( e.label ) if s == "string" then s = mw.text.trim( e.label ) if s == "" then s = string.format( "params.%s.%s[%d].label %s", at, "suggestedvalues", i, "EMPTY" ) Fault( s ) else story = s end elseif s == "table" then story = faraway( e.label ) else s = string.format( "params.%s.%s[%d].label INVALID", at, "suggestedvalues", i ) Fault( s ) end end s = false if type( e.icon ) == "string" then t = mw.title.makeTitle( 6, e.icon ) if t and t.file.exists then local g = mw.html.create( "span" ) s = string.format( "[[%s|16px]]", t.prefixedText ) g:attr( "role", "presentation" ) :wikitext( s ) s = tostring( g ) end end if not s and not less and e.label then s = mw.ustring.char( 0x2013 ) end if s then d = mw.html.create( "span" ) :wikitext( s ) if TemplateData.ltr then if not less then d:css( "margin-left", "0.5em" ) end if story then d:css( "margin-right", "0.5em" ) end else if not less then d:css( "margin-right", "0.5em" ) end if story then d:css( "margin-left", "0.5em" ) end end u:node( d ) end if story then u:wikitext( story ) end r1:newline() :node( u ) end -- for i end if not r1 and v ~= false then Fault( string.format( "params.%s.suggestedvalues INVALID", at ) ) r1 = mw.html.create( "code" ) :addClass( "error" ) :wikitext( "INVALID" ) end return r1, r2 end -- feasible() local function feat() -- Check and store parameter sequence if Data.source then local i = 0 local s for k, v in pairs( Data.tree.params ) do if i == 0 then Data.order = { } i = 1 s = k else i = 2 break -- for k, v end end -- for k, v if i > 1 then local pointers = { } local points = { } local given = { } for k, v in pairs( Data.tree.params ) do i = facet( k, 1 ) if type( v ) == "table" then if type( v.label ) == "string" then s = mw.text.trim( v.label ) if s == "" then s = k end else s = k end if given[ s ] then if given[ s ] == 1 then local scream = "Parameter label '%s' detected multiple times" Fault( string.format( scream, s ) ) given[ s ] = 2 end else given[ s ] = 1 end end if i then table.insert( points, i ) pointers[ i ] = k i = facet( k, i ) if i then s = "Parameter '%s' detected twice" Fault( string.format( s, k ) ) end else s = "Parameter '%s' not detected" Fault( string.format( s, k ) ) end end -- for k, v table.sort( points ) for i = 1, #points do table.insert( Data.order, pointers[ points[ i ] ] ) end -- i = 1, #points elseif s then table.insert( Data.order, s ) end end end -- feat() local function feature( access ) -- Create table row for parameter, check and display violations -- Parameter: -- access -- string, with name -- Returns <tr> local mode, s, status local fine = function ( a ) s = mw.text.trim( a ) return a == s and a ~= "" and not a:find( "%|=\n" ) and not a:find( "%s%s" ) end local begin = mw.html.create( "td" ) local code = mw.html.create( "code" ) local desc = mw.html.create( "td" ) local eager = mw.html.create( "td" ) local legal = true local param = Data.tree.params[ access ] local ranking = { "required", "suggested", "optional", "deprecated" } local r = mw.html.create( "tr" ) local styles = "mw-templatedata-doc-param-" local sort, typed for k, v in pairs( param ) do if v == "" then param[ k ] = false end end -- for k, v -- label sort = param.label or access if sort:match( "^%d+$" ) then begin:attr( "data-sort-value", string.format( "%05d", tonumber( sort ) ) ) end begin:css( "font-weight", "bold" ) :wikitext( sort ) -- name and aliases code:css( "font-size", "92%" ) :css( "white-space", "nowrap" ) :wikitext( access ) if not fine( access ) then code:addClass( "error" ) Fault( string.format( "Bad ID params.<code>%s</code>", access ) ) legal = false begin:attr( "data-sort-value", " " .. sort ) end code = mw.html.create( "td" ) :addClass( styles .. "name" ) :node( code ) if access:match( "^%d+$" ) then code:attr( "data-sort-value", string.format( "%05d", tonumber( access ) ) ) end if type( param.aliases ) == "table" then local lapsus, syn for k, v in pairs( param.aliases ) do code:tag( "br" ) if type( v ) == "string" then if not fine( v ) then lapsus = true code:node( mw.html.create( "span" ) :addClass( "error" ) :css( "font-style", "italic" ) :wikitext( "string" ) ) :wikitext( s ) else syn = mw.html.create( "span" ) :addClass( styles .. "alias" ) :css( "white-space", "nowrap" ) :wikitext( s ) code:node( syn ) end else lapsus = true code:node( mw.html.create( "code" ) :addClass( "error" ) :wikitext( type( v ) ) ) end end -- for k, v if lapsus then s = string.format( "params.<code>%s</code>.aliases", access ) Fault( factory( "invalid-value" ):gsub( "$1", s ) ) legal = false end end -- description etc. s = fashioned( param ) if s then desc:node( s ) end if param.style then s = type( param.style ) if s == "table" then desc:css( param.style ) elseif s == "string" then desc:cssText( param.style ) end end if param.suggestedvalues or param.default or param.example or param.autovalue then local details = { "suggestedvalues", "default", "example", "autovalue" } local dl = mw.html.create( "dl" ) local dd, section, show for i = 1, #details do s = details[ i ] show = param[ s ] if show then dd = mw.html.create( "dd" ) section = factory( "doc-param-" .. s ) if param.type == "boolean" and ( show == "0" or show == "1" ) then local boole = Permit.boole[ ( show == "1" ) ] if boole.lead == true then dd:node( mw.html.create( "code" ) :wikitext( show ) ) :wikitext( " " ) end if type( boole.show ) == "string" then local v = mw.html.create( "span" ) :attr( "aria-hidden", "true" ) :wikitext( boole.show ) if boole.css then v:css( boole.css ) end dd:node( v ) end if type( boole.suffix ) == "string" then dd:wikitext( boole.suffix ) end if boole.lead == false then dd:wikitext( " " ) :node( mw.html.create( "code" ) :wikitext( show ) ) end elseif s == "suggestedvalues" then local v, css, class, ts = facilities( param ) if v then local ul ul, v = feasible( param, access, v ) if v then dd:newline() :node( ul ) if css then dd:css( css ) if class then dd:addClass( class ) end if ts then dd:newline() dd:node( ts ) end end Data.params[ access ].suggestedvalues = v end end else dd:wikitext( show ) end dl:node( mw.html.create( "dt" ) :wikitext( section ) ) :node( dd ) end end -- i = 1, #details desc:node( dl ) end -- type if type( param.type ) == "string" then param.type = mw.text.trim( param.type ) if param.type == "" then param.type = false end end if param.type then s = Permit.types[ param.type ] typed = mw.html.create( "td" ) :addClass( styles .. "type" ) if s then if s == "string" then Data.params[ access ].type = s typed:wikitext( factory( "doc-param-type-" .. s ) ) :tag( "br" ) typed:node( mw.html.create( "span" ) :addClass( "error" ) :wikitext( param.type ) ) Data.lasting = true else local support = Config[ "support4" .. param.type ] s = factory( "doc-param-type-" .. param.type ) if support then s = string.format( "[[%s|%s]]", support, s ) end typed:wikitext( s ) end else Data.params[ access ].type = "unknown" typed:addClass( "error" ) :wikitext( "INVALID" ) s = string.format( "params.<code>%s</code>.type", access ) Fault( factory( "invalid-value" ):gsub( "$1", s ) ) legal = false end else typed = mw.html.create( "td" ) :wikitext( factory( "doc-param-type-unknown" ) ) Data.params[ access ].type = "unknown" if param.default then Data.params[ access ].default = nil Fault( "Default value requires <code>type</code>" ) legal = false end end typed:addClass( "navigation-not-searchable" ) -- status if param.required then mode = 1 if param.autovalue then Fault( string.format( "autovalued <code>%s</code> required", access ) ) legal = false end if param.default then Fault( string.format( "Defaulted <code>%s</code> required", access ) ) legal = false end if param.deprecated then Fault( string.format( "Required deprecated <code>%s</code>", access ) ) legal = false end elseif param.deprecated then mode = 4 elseif param.suggested then mode = 2 else mode = 3 end status = ranking[ mode ] ranking = factory( "doc-param-status-" .. status ) if mode == 1 or mode == 4 then ranking = mw.html.create( "span" ) :css( "font-weight", "bold" ) :wikitext( ranking ) if type( param.deprecated ) == "string" then ranking:tag( "br" ) ranking:wikitext( param.deprecated ) end if param.suggested and mode == 4 then s = string.format( "Suggesting deprecated <code>%s</code>", access ) Fault( s ) legal = false end end eager:attr( "data-sort-value", tostring( mode ) ) :node( ranking ) :addClass( string.format( "%sstatus-%s %s", styles, status, "navigation-not-searchable" ) ) -- <tr> r:attr( "id", "templatedata:" .. mw.uri.anchorEncode( access ) ) :css( Permit.css[ status ] ) :addClass( styles .. status ) :node( begin ) :node( code ) :node( desc ) :node( typed ) :node( eager ) :newline() if not legal then r:css( "border", "#FF0000 3px solid" ) end return r end -- feature() local function features() -- Create <table> for parameters -- Returns <table>, or nil local r if Data.tree and Data.tree.params then local tbl = mw.html.create( "table" ) local tr = mw.html.create( "tr" ) feat() if Data.order and #Data.order > 1 then tbl:addClass( "sortable" ) end if type( Config.classTable ) == "table" then for k, v in pairs( Config.classTable ) do tbl:addClass( v ) end -- for k, v end if type( Config.cssTable ) == "table" then tbl:css( Config.cssTable ) end tr:addClass( "navigation-not-searchable" ) :node( mw.html.create( "th" ) :attr( "colspan", "2" ) :css( Permit.css.tablehead ) :wikitext( factory( "doc-param-name" ) ) ) :node( mw.html.create( "th" ) :css( Permit.css.tablehead ) :wikitext( factory( "doc-param-desc" ) ) ) :node( mw.html.create( "th" ) :css( Permit.css.tablehead ) :wikitext( factory( "doc-param-type" ) ) ) :node( mw.html.create( "th" ) :css( Permit.css.tablehead ) :wikitext( factory( "doc-param-status" ) ) ) tbl:newline() -- :node( mw.html.create( "thead" ) :node( tr ) -- ) :newline() if Data.order then local leave, s for i = 1, #Data.order do s = Data.order[ i ] if s:sub( 1, 1 ) == "=" then leave = true tbl:node( fatten( s ) ) Data.order[ i ] = false elseif s:match( "[=|]" ) then Fault( string.format( "Bad param <code>%s</code>", s ) ) else tbl:node( feature( s ) ) end end -- for i = 1, #Data.order if leave then for i = #Data.order, 1, -1 do if not Data.order[ i ] then table.remove( Data.order, i ) end end -- for i = #Data.order, 1, -1 end Data.tag.paramOrder = Data.order end if Config.cssTabWrap or Data.scroll then r = mw.html.create( "div" ) if type( Config.cssTabWrap ) == "table" then r:css( Config.cssTabWrap ) elseif type( Config.cssTabWrap ) == "string" then -- deprecated r:cssText( Config.cssTabWrap ) end if Data.scroll then r:css( "height", Data.scroll ) :css( "overflow", "auto" ) end r:node( tbl ) else r = tbl end end return r end -- features() local function fellow( any, assigned, at ) -- Check sets[] parameter and issue error message, if necessary -- Parameter: -- any -- should be number -- assigned -- parameter name -- at -- number, of set local s if type( any ) ~= "number" then s = "<code>sets[%d].params[%s]</code>??" Fault( string.format( s, at, mw.text.nowiki( tostring( any ) ) ) ) elseif type( assigned ) == "string" then if not Data.got.params[ assigned ] then s = "<code>sets[%d].params %s</code> is undefined" Fault( string.format( s, at, assigned ) ) end else s = "<code>sets[%d].params[%d] = %s</code>??" Fault( string.format( s, k, type( assigned ) ) ) end end -- fellow() local function fellows() -- Check sets[] and issue error message, if necessary local s if type( Data.got.sets ) == "table" then if type( Data.got.params ) == "table" then for k, v in pairs( Data.got.sets ) do if type( k ) == "number" then if type( v ) == "table" then for ek, ev in pairs( v ) do if ek == "label" then s = type( ev ) if s ~= "string" and s ~= "table" then s = "<code>sets[%d].label</code>??" Fault( string.format( s, k ) ) end elseif ek == "params" and type( ev ) == "table" then for pk, pv in pairs( ev ) do fellow( pk, pv, k ) end -- for pk, pv else ek = mw.text.nowiki( tostring( ek ) ) s = "<code>sets[%d][%s]</code>??" Fault( string.format( s, k, ek ) ) end end -- for ek, ev else k = mw.text.nowiki( tostring( k ) ) v = mw.text.nowiki( tostring( v ) ) s = string.format( "<code>sets[%s][%s]</code>??", k, v ) Fault( s ) end else k = mw.text.nowiki( tostring( k ) ) s = string.format( "<code>sets[%s]</code> ?????", k ) Fault( s ) end end -- for k, v else s = "<code>params</code> required for <code>sets</code>" Fault( s ) end else s = "<code>sets</code> needs to be of <code>object</code> type" Fault( s ) end end -- fellows() local function finalize( advance ) -- Wrap presentation into frame -- Parameter: -- advance -- true, for nice -- Returns string local r, lapsus if Data.div then r = tostring( Data.div ) elseif Data.strip then r = Data.strip else lapsus = true r = "" end r = r .. failures() if Data.source then local live = ( advance or lapsus ) if not live then live = TemplateData.frame:preprocess( "{{REVISIONID}}" ) live = ( live == "" ) end if live then r = r .. fancy( advance, lapsus ) end end return r end -- finalize() local function find() -- Find JSON data within page source (title) -- Returns string, or nil local s = Data.title:getContent() local i, j = s:find( "<templatedata>", 1, true ) local r if i then local k = s:find( "</templatedata>", j, true ) if k then r = mw.text.trim( s:sub( j + 1, k - 1 ) ) end end return r end -- find() local function flat( adjust ) -- Remove formatting from text string for VE -- Parameter: -- arglist -- string, to be stripped, or nil -- Returns string, or nil local r if adjust then r = adjust:gsub( "\n", " " ) if r:find( "<noexport>", 1, true ) then r = r:gsub( "<noexport>.*</noexport>", "" ) end if r:find( "<exportonly>", 1, true ) then r = r:gsub( "</?exportonly>", "" ) end if r:find( "''", 1, true ) then r = r:gsub( "'''", "" ):gsub( "''", "" ) end if r:find( "<", 1, true ) then local Text = Fetch( "Text" ) r = Text.getPlain( r:gsub( "<br */?>", "\r\n" ) ) end if r:find( "[", 1, true ) then local WLink = Fetch( "WLink" ) if WLink.isBracketedURL( r ) then r = r:gsub( "%[([hf]tt?ps?://%S+) [^%]]+%]", "%1" ) end r = WLink.getPlain( r ) end if r:find( "&", 1, true ) then r = mw.text.decode( r ) if r:find( "&shy;", 1, true ) then r = r:gsub( "&shy;", "" ) end end end return r end -- flat() local function flush() -- JSON encode narrowed input; obey unnamed (numerical) parameters -- Returns <templatedata> JSON string local r if Data.tag then r = mw.text.jsonEncode( Data.tag ):gsub( "%}$", "," ) else r = "{" end r = r .. "\n\"params\":{" if Data.order then local sep = "" local s for i = 1, #Data.order do s = Data.order[ i ] r = string.format( "%s%s\n%s:%s", r, sep, mw.text.jsonEncode( s ), mw.text.jsonEncode( Data.params[ s ] ) ) sep = ",\n" end -- for i = 1, #Data.order end r = r .. "\n}\n}" return r end -- flush() local function focus( access ) -- Check components; focus multilingual description, build trees -- Parameter: -- access -- string, name of parameter, nil for root local f = function ( a, at ) local r if at then r = string.format( "<code>params.%s</code>", at ) else r = "''root''" end if a then r = string.format( "%s<code>.%s</code>", r, a ) end return r end local parent if access then parent = Data.got.params[ access ] else parent = Data.got end if type( parent ) == "table" then local elem, got, permit, s, scope, slot, tag, target if access then permit = Permit.params if type( access ) == "number" then slot = tostring( access ) else slot = access end else permit = Permit.root end for k, v in pairs( parent ) do scope = permit[ k ] if scope then s = type( v ) if s == "string" and k ~= "format" then v = mw.text.trim( v ) end if scope:find( s, 1, true ) then if scope:find( "I18N", 1, true ) then if s == "string" then elem = fair( v ) elseif s == "table" then local translated v, translated = faraway( v ) if v then if translated and k == "description" then elem = { [ 1 ] = fair( v ), [ 2 ] = translated } else elem = fair( v ) end else elem = false end end if type( v ) == "string" then if k == "deprecated" then if v == "1" then v = true elseif v == "0" then v = false end elem = v elseif scope:find( "nowiki", 1, true ) then elem = mw.text.nowiki( v ) elem = elem:gsub( "&#13;\n", "<br>" ) v = v:gsub( string.char( 13 ), "" ) else v = flat( v ) end elseif s == "boolean" then if scope:find( "boolean", 1, true ) then elem = v else s = "Type <code>boolean</code> bad for " .. f( k, slot ) Fault( s ) end end else if k == "params" and not access then v = nil elem = nil elseif k == "format" and not access then elem = mw.text.decode( v ) v = nil elseif k == "inherits" then elem = v if not Data.heirs then Data.heirs = { } end Data.heirs[ slot ] = v v = nil elseif k == "style" then elem = v v = nil elseif s == "string" then v = mw.text.nowiki( v ) elem = v else elem = v end end if type( elem ) ~= "nil" then if not target then if access then if not Data.tree.params then Data.tree.params = { } end Data.tree.params[ slot ] = { } target = Data.tree.params[ slot ] else Data.tree = { } target = Data.tree end end target[ k ] = elem elem = false end if type( v ) ~= "nil" then if not tag then if access then if type( v ) == "string" and v.sub( 1, 1 ) == "=" then v = nil else if not Data.params then Data.params = { } end Data.params[ slot ] = { } tag = Data.params[ slot ] end else Data.tag = { } tag = Data.tag end end if type( v ) ~= "nil" and k ~= "suggestedvalues" then tag[ k ] = v end end else s = string.format( "Type <code>%s</code> bad for %s", scope, f( k, slot ) ) Fault( s ) end else Fault( "Unknown component " .. f( k, slot ) ) end end -- for k, v if not access and Data.got.sets then fellows() end else Fault( f() .. " needs to be of <code>object</code> type" ) end end -- focus() local function format() -- Build formatted element -- Returns <inline> local source = Data.tree.format:lower() local r, s if source == "inline" or source == "block" then r = mw.html.create( "i" ) :wikitext( source ) else local code if source:find( "|", 1, true ) then local scan = "^[\n ]*%{%{[\n _]*|[\n _]*=[\n _]*%}%}[\n ]*$" if source:match( scan ) then code = source:gsub( "\n", "N" ) else s = mw.text.nowiki( source ):gsub( "\n", "&#92;n" ) s = tostring( mw.html.create( "code" ) :wikitext( s ) ) Fault( "Invalid format " .. s ) source = false end else local words = mw.text.split( source, "%s+" ) local show, start, support, unknown for i = 1, #words do s = words[ i ] if i == 1 then start = s end support = Permit.builder[ s ] if support == start or support == "*" then Permit.builder[ s ] = true elseif s:match( "^[1-9]%d?" ) and Permit.builder.align then Permit.builder.align = tonumber( s ) else if unknown then unknown = string.format( "%s %s", unknown, s ) else unknown = s end end end -- i = 1, #words if unknown then s = tostring( mw.html.create( "code" ) :css( "white-space", "nowrap" ) :wikitext( s ) ) Fault( "Unknown/misplaced format keyword " .. s ) source = false start = false end if start == "inline" then if Permit.builder.half == true then show = "inline half" code = "{{_ |_=_}}" elseif Permit.builder.grouped == true then show = "inline grouped" code = "{{_ | _=_}}" elseif Permit.builder.spaced == true then show = "inline spaced" code = "{{_ | _ = _ }}" end if Permit.builder.newlines == true then show = show or "inline" code = code or "{{_|_=_}}" show = show .. " newlines" code = string.format( "N%sN", code ) end elseif start == "block" then local space = "" -- amid "|" and name local spaced = " " -- preceding "=" local spacer = " " -- following "=" local suffix = "N" -- closing "}}" on new line show = "block" if Permit.builder.indent == true then start = " " show = "block indent" else start = "" end if Permit.builder.compressed == true then spaced = "" spacer = "" show = show .. " compressed" if Permit.builder.last == true then show = show .. " last" else suffix = "" end else if Permit.builder.lead == true then show = show .. " lead" space = " " end if type( Permit.builder.align ) ~= "string" then local n s = " align" if Permit.builder.align == true then n = 0 if type( Data.got ) == "table" and type( Data.got.params ) == "table" then for k, v in pairs( Data.got.params ) do if type( v ) == "table" and not v.deprecated and type( k ) == "string" then k = mw.ustring.len( k ) if k > n then n = k end end end -- for k, v end else n = Permit.builder.align if type( n ) == "number" and n > 1 then s = string.format( "%s %d", s, n ) else n = 0 -- How comes? end end if n > 1 then spaced = string.rep( "_", n - 1 ) .. " " end show = show .. s elseif Permit.builder.after == true then spaced = "" show = show .. " after" elseif Permit.builder.dense == true then spaced = "" spacer = "" show = show .. " dense" end if Permit.builder.last == true then suffix = spacer show = show .. " last" end end code = string.format( "N{{_N%s|%s_%s=%s_%s}}N", start, space, spaced, spacer, suffix ) if show == "block" then show = "block newlines" end end if show then r = mw.html.create( "span" ) :wikitext( show ) end end if code then source = code:gsub( "N", "\n" ) code = mw.text.nowiki( code ):gsub( "N", "&#92;n" ) code = mw.html.create( "code" ) :css( "margin-left", "1em" ) :css( "margin-right", "1em" ) :wikitext( code ) if r then r = mw.html.create( "span" ) :node( r ) :node( code ) else r = code end end end if source and Data.tag then Data.tag.format = source end return r end -- format() local function formatter() -- Build presented documentation -- Returns <div> local r = mw.html.create( "div" ) local x = fashioned( Data.tree, true, r ) local s if x then r = x end if Data.leading then local toc = mw.html.create( "div" ) local shift if Config.suppressTOCnum then toc:addClass( Config.suppressTOCnum ) if type( Config.stylesTOCnum ) == "string" then local src = Config.stylesTOCnum .. "/styles.css" s = TemplateData.frame:extensionTag( "templatestyles", nil, { src = src } ) r:newline() :node( s ) end end toc:addClass( "navigation-not-searchable" ) :css( "margin-top", "0.5em" ) :wikitext( "__TOC__" ) if Data.sibling then local block = mw.html.create( "div" ) if TemplateData.ltr then shift = "right" else shift = "left" end block:css( "float", shift ) :wikitext( Data.sibling ) r:newline() :node( block ) :newline() end r:newline() :node( toc ) :newline() if shift then r:node( mw.html.create( "div" ) :css( "clear", shift ) ) :newline() end end s = features() if s then if Data.leading then r:node( mw.html.create( "h" .. Config.nested ) :wikitext( factory( "doc-params" ) ) ) :newline() end r:node( s ) end if Data.shared then local global = mw.html.create( "div" ) :attr( "id", "templatedata-global" ) local shift if TemplateData.ltr then shift = "right" else shift = "left" end global:css( "float", shift ) :wikitext( string.format( "[[%s|%s]]", Data.shared, "Global" ) ) r:newline() :node( global ) end if Data.tree and Data.tree.format then local e = format() if e then local show = "Format" if Config.supportFormat then show = string.format( "[[%s|%s]]", Config.supportFormat, show ) end r:node( mw.html.create( "p" ) :addClass( "navigation-not-searchable" ) :wikitext( show .. ": " ) :node( e ) ) end end return r end -- formatter() local function free() -- Remove JSON comment lines if Data.source:find( "//", 1, true ) then Data.source:gsub( "([{,\"'])(%s*\n%s*//.*\n%s*)([{},\"'])", "%1%3" ) end end -- free() local function full() -- Build survey table from JSON data, append invisible <templatedata> Data.div = mw.html.create( "div" ) :addClass( "mw-templatedata-doc-wrap" ) if Permit.css.bg then Data.div:css( Permit.css.bg ) end if Permit.css.fg then Data.div:css( Permit.css.fg ) end focus() if Data.tag then if type( Data.got.params ) == "table" then for k, v in pairs( Data.got.params ) do focus( k ) end -- for k, v if Data.heirs then fathers() end end end Data.div:node( formatter() ) if not Data.lazy then Data.slim = flush() if TemplateData.frame then local div = mw.html.create( "div" ) local tdata = { [ 1 ] = "templatedata", [ 2 ] = Data.slim } Data.strip = TemplateData.frame:callParserFunction( "#tag", tdata ) div:wikitext( Data.strip ) if Config.loudly then Data.div:node( mw.html.create( "hr" ) :css( { height = "7ex" } ) ) else div:css( "display", "none" ) end Data.div:node( div ) end end if Data.lasting then Fault( "deprecated type syntax" ) end if Data.less then Fault( Config.solo ) end end -- full() local function furnish( adapt, arglist ) -- Analyze transclusion -- Parameter: -- adapt -- table, #invoke parameters -- arglist -- table, template parameters -- Returns string local source favorize() -- deprecated: for k, v in pairs( Config.basicCnf ) do if adapt[ k ] and adapt[ k ] ~= "" then Config[ v ] = adapt[ k ] end end -- for k, v if arglist.heading and arglist.heading:match( "^[3-6]$" ) then Config.nested = arglist.heading else Config.nested = "2" end Config.loudly = faculty( arglist.debug or adapt.debug ) Data.lazy = faculty( arglist.lazy ) and not Config.loudly Data.leading = faculty( arglist.TOC ) if Data.leading and arglist.TOCsibling then Data.sibling = mw.text.trim( arglist.TOCsibling ) end if arglist.lang then Data.slang = arglist.lang:lower() elseif adapt.lang then Data.slang = adapt.lang:lower() end if arglist.JSON then source = arglist.JSON elseif arglist.Global then source = TemplateData.getGlobalJSON( arglist.Global, arglist.Local ) elseif arglist[ 1 ] then local s = mw.text.trim( arglist[ 1 ] ) local start = s:sub( 1, 1 ) if start == "<" then Data.strip = s elseif start == "{" then source = s elseif mw.ustring.sub( s, 1, 8 ) == mw.ustring.char( 127, 39, 34, 96, 85, 78, 73, 81 ) then Data.strip = s end end if type( arglist.vertical ) == "string" and arglist.vertical:match( "^%d*%.?%d+[emprx]+$" ) then Data.scroll = arglist.vertical end if not source then Data.title = mw.title.getCurrentTitle() source = find() if not source and not Data.title.text:match( Config.subpage ) then local s = string.format( Config.suffix, Data.title.prefixedText ) Data.title = mw.title.new( s ) if Data.title.exists then source = find() end end end if not Data.lazy then if not Data.title then Data.title = mw.title.getCurrentTitle() end Data.lazy = Data.title.text:match( Config.subpage ) end if type( source ) == "string" then TemplateData.getPlainJSON( source ) end return finalize( faculty( arglist.source ) ) end -- furnish() Failsafe.failsafe = function ( atleast ) -- Retrieve versioning and check for compliance -- Precondition: -- atleast -- string, with required version -- or wikidata|item|~|@ or false -- Postcondition: -- Returns string -- with queried version/item, also if problem -- false -- if appropriate -- 2020-08-17 local since = atleast local last = ( since == "~" ) local linked = ( since == "@" ) local link = ( since == "item" ) local r if last or link or linked or since == "wikidata" then local item = Failsafe.item since = false if type( item ) == "number" and item > 0 then local suited = string.format( "Q%d", item ) if link then r = suited else local entity = mw.wikibase.getEntity( suited ) if type( entity ) == "table" then local seek = Failsafe.serialProperty or "P348" local vsn = entity:formatPropertyValues( seek ) if type( vsn ) == "table" and type( vsn.value ) == "string" and vsn.value ~= "" then if last and vsn.value == Failsafe.serial then r = false elseif linked then if mw.title.getCurrentTitle().prefixedText == mw.wikibase.getSitelink( suited ) then r = false else r = suited end else r = vsn.value end end end end end end if type( r ) == "nil" then if not since or since <= Failsafe.serial then r = Failsafe.serial else r = false end end return r end -- Failsafe.failsafe() TemplateData.getGlobalJSON = function ( access, adapt ) -- Retrieve TemplateData from a global repository (JSON) -- Parameter: -- access -- string, with page specifier (on WikiMedia Commons) -- adapt -- JSON string or table with local overrides -- Returns true, if succeeded local plugin = Fetch( "/global" ) local r if type( plugin ) == "table" and type( plugin.fetch ) == "function" then local s, got = plugin.fetch( access, adapt ) if got then Data.got = got Data.order = got.paramOrder Data.shared = s r = true full() else Fault( s ) end end return r end -- TemplateData.getGlobalJSON() TemplateData.getPlainJSON = function ( adapt ) -- Reduce enhanced JSON data to plain text localized JSON -- Parameter: -- adapt -- string, with enhanced JSON -- Returns string, or not if type( adapt ) == "string" then Data.source = adapt free() local lucky lucky, Data.got = pcall( mw.text.jsonDecode, Data.source ) if type( Data.got ) == "table" then full() elseif not Data.strip then local scream = type( Data.got ) if scream == "string" then scream = Data.got else scream = "Data.got: " .. scream end Fault( "fatal JSON error: " .. scream ) end end return Data.slim end -- TemplateData.getPlainJSON() TemplateData.test = function ( adapt, arglist ) TemplateData.frame = mw.getCurrentFrame() return furnish( adapt, arglist ) end -- TemplateData.test() -- Export local p = { } p.f = function ( frame ) -- Template call local lucky, r TemplateData.frame = frame lucky, r = pcall( furnish, frame.args, frame:getParent().args ) if not lucky then Fault( "INTERNAL: " .. r ) r = failures() end return r end -- p.f p.failsafe = function ( frame ) -- Versioning interface local s = type( frame ) local since if s == "table" then since = frame.args[ 1 ] elseif s == "string" then since = frame end if since then since = mw.text.trim( since ) if since == "" then since = false end end return Failsafe.failsafe( since ) or "" end -- p.failsafe p.TemplateData = function () -- Module interface return TemplateData end return p a0976bcf0e87d0e519ff239bd6aec0b63b6f40c6 Module:Parameter names example 828 63 123 2023-07-10T09:41:44Z wikipedia>Gonnym 0 if these are wanted, they should be handled differently (by passing a parameter to this module) as these cause pages to appear as unknown parameters for templates that don't use them Scribunto text/plain -- This module implements {{parameter names example}}. local p = {} local function makeParam(s) local lb = '&#123;' local rb = '&#125;' return lb:rep(3) .. s .. rb:rep(3) end local function italicize(s) return "''" .. s .. "''" end local function plain(s) return s end function p._main(args, frame) -- Find how we want to format the arguments to the template. local formatFunc if args._display == 'italics' or args._display == 'italic' then formatFunc = italicize elseif args._display == 'plain' then formatFunc = plain else formatFunc = makeParam end -- Build the table of template arguments. local targs = {} for k, v in pairs(args) do if type(k) == 'number' then targs[v] = formatFunc(v) elseif not k:find('^_') then targs[k] = v end end --targs['nocat'] = 'yes'; --targs['categories'] = 'no'; --targs['demo'] = 'yes'; -- Find the template name. local template if args._template then template = args._template else local currentTitle = mw.title.getCurrentTitle() if currentTitle.prefixedText:find('/sandbox$') then template = currentTitle.prefixedText else template = currentTitle.basePageTitle.prefixedText end end -- Call the template with the arguments. frame = frame or mw.getCurrentFrame() local success, result = pcall( frame.expandTemplate, frame, {title = template, args = targs} ) if success then return result else return '' end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Parameter names example' }) return p._main(args, frame) end return p fdf94fb7a5dc1fabf118d60488a02f1e65b0df24 Module:Lang 828 92 257 2023-07-28T21:46:18Z wikipedia>Trappist the monk 0 Scribunto text/plain --[=[ Lua support for the {{lang}}, {{lang-xx}}, and {{transliteration}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_latin() and is_rtl() local yesno = require ('Module:Yesno'); local lang_data = mw.loadData ('Module:Lang/data'); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ validates |italic= or |italics= assigned values. When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or transl function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-xx}} depending on the individual template's requirements, 'italic' for {{transliteration}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-xx}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {['yes'] = 'italic', ['no'] = 'normal', ['unset'] = 'inherit', ['invert'] = 'invert', ['default'] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, 'only one of |italic=, |italics=, or |i= can be specified'; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-xx}} templates is to add categorization when the templates are used in mainspace. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array ( needle, haystack ) if needle == nil then return false; end for n,v in ipairs( haystack ) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ prettify ietf tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-xx}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=) returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. see http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1 ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- ietf tag parts if not is_set (source) then return nil, nil, nil, nil, nil, 'missing language tag'; end local pattern = { -- table of tables holding acceptibe ietf tag patterns and short names of the ietf part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured ietf tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named ietf parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language tag: ', source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language code: ', code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, 'redundant script tag'; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, table.concat ({'unrecognized script: ', script, ' for code: ', code}); -- language code ok, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, table.concat ({'script: ', script, ' not supported for code: ', code}); -- language code ok, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, 'redundant region tag'; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, table.concat ({'unrecognized region: ', region, ' for code: ', code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, 'redundant variant tag'; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-script pair: ', code, '-', script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-region pair: ', code, '-', region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code: ', code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, table.concat ({'unrecognized private tag: ', private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args, template) local out = {}; local category; if 'Transliteration' == template then category = 'Transliteration'; else category = 'Lang and lang-xx' end table.insert (out, table.concat ({'[', args.text or 'undefined', '] '})); -- for error messages output args.text if available table.insert (out, table.concat ({'<span style=\"color:#d33\">Error: {{', template, '}}: '})); table.insert (out, msg); table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'})); table.insert (out, '</span>'); if (0 == namespace or 10 == namespace) and not args.nocat then -- categorize in article space (and template space to take care of broken usages) table.insert (out, table.concat ({'[[Category:', category, ' template errors]]'})); end return table.concat (out); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- adds <i> and </i> tags to list-item text or to implied <p>..</p> text. mixed not supported ]] local function div_markup_add (text, style) local implied_p = {}; if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics mediawiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each impled p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in html markup. This because the lang= attibute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the html markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default html tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> html tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening html tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> html tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = table.concat ({language, ' text'}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = table.concat ({language, ' collective text'}); -- for collective languages else title_text = table.concat ({language, '-language text'}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Category:Articles containing <language>-language text]] for English: [[Category:Articles containing explicitly cited English-language text]] for ISO 639-2 collective languages (and for 639-1 bh): [[Category:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) local cat = {}; local retval; if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return table.concat ({'[[Category:Articles with text in ', language_name, ']]'}); end table.insert (cat, '[[Category:Articles containing '); if this_wiki_lang_tag == code then table.insert (cat, 'explicitly cited ' .. language_name); -- unique category name for the local language else table.insert (cat, language_name); end table.insert (cat, '-language text]]'); return table.concat (cat); end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string The value |script= is not used in {{transliteration}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transliteration}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript) This function is used by both lang_xx() and transl() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style transl() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transliteration}}, style only applies when a language code is provided ]] local function make_translit (code, language_name, translit, std, tscript, style) local title; local out_t = {}; local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' romanization'; -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = title_text .. table.concat ({title_t[std][tscript:lower()], ' (', script_table[tscript], ' script) transliteration'}); -- add the appropriate text to the tool tip else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (transl may not provide a language code) title_text = title_text .. table.concat ({title_t[std][code:lower()], ' (', language_name, ' language) transliteration'}); -- add the appropriate text to the tool tip else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = title_text .. table.concat ({language_name, '-script transliteration'}); -- write a script tool tip elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' transliteration'; -- finish the tool tip else title_text = title_text .. ' transliteration'; -- generic tool tip (can we ever get here?) end end end local close_tag; if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transliteration}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style table.insert (out_t, "<i lang=\""); -- so use <i> tag close_tag = '</i>'; -- tag to be used when closing else table.insert (out_t, table.concat ({'<span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it close_tag = '</span>'; -- tag to be used when closing end table.insert (out_t, code); table.insert (out_t, "-Latn\">"); -- transliterations are always Latin script else table.insert (out_t, "<span>"); -- when no language code: no lang= attribute, not italic ({{transliteration}} only) close_tag = '</span>'; end table.insert (out_t, translit); -- add the translit text table.insert (out_t, close_tag); -- and add the appropriate </i> or </span> if '' == title_text then -- when there is no need for a tool-tip return table.concat (out_t); -- make a string and done else return title_wrapper_make (title_text, table.concat (out_t), 'span'); -- wrap with a tool-tip span and don end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg ('no text', args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg ('text has malformed markup', args, template); end local style = args.italic; if ('unset' ~= style) and ('invert' ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg ('text has italic markup', args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ render mainenance messages and categories ]] local function render_maint(nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ for proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and / or inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ looks for a poem strip marker in text; returns true when found; false else auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate html tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns as nil with a second return value of true indicating that some other value has been assigned to |proto= ]] local function validate_proto (proto_param) if 'yes' == proto_param then return true; elseif 'no' == proto_param then return false; elseif is_set (proto_param) then return nil, true; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- common function to return language name from the data set according to IETF tag returns language name if found in data tables; nil else ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to iana active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the iana deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'})); end return name; -- name from data tables or nil end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg ('conflicting: {{{1}}} and |code=', args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg ('conflicting: {{{2}}} and |text=', args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg ( msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and unicode.is_Latin (args.text)) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant if 'invert' == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function lang (frame) local args = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return _lang (args); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- stand-alone function to create literal translation of main text Also used by {{lang-x2}} ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> html tag if 'no' == args_t.link then table.insert (translation_t, '<abbr title="literal translation">lit.</abbr>'); -- unlinked form else table.insert (translation_t, make_wikilink ('Literal translation', 'lit.')); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> html tag end table.insert (translation_t, table.concat ({'&#39;', args_t.translation, '&#39;'})); -- use html entities to avoid wiki markup confusion return table.concat (translation_t); -- make a big string and done end --[[--------------------------< L A N G _ X X >---------------------------------------------------------------- For the {{lang-xx}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-xx}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-xx}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-xx}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-xx}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args) local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local translit_title; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang-xx'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if args[1] and args.text then return make_error_msg ('conflicting: {{{1}}} and |text=', args, template); else args.text = args[1] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly if args[2] and args.translit then return make_error_msg ('conflicting: {{{2}}} and |translit=', args, template); else args.translit = args[2] or args.translit -- prefer args.translit end if args[3] and (args.translation or args.lit) then return make_error_msg ('conflicting: {{{3}}} and |lit= or |translation=', args, template); elseif args.translation and args.lit then return make_error_msg ('conflicting: |lit= and |translation=', args, template); else args.translation = args[3] or args.translation or args.lit; -- prefer args.translation end if args.links and args.link then return make_error_msg ('conflicting: |links= and |link=', args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if 'no' == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (language_name .. ' language', language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if 'invert' == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not unicode.is_Latin (args.text) then -- transliteration (not supported in {{lang}}); not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object if translit_title.exists and ('no' ~= args.link) then table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'romanized') .. ':'); -- make a wikilink if there is an article to link to else table.insert (out, 'romanized:'); -- else plain text end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script']) if is_set (translit) then table.insert (out, translit); else return make_error_msg (table.concat ({'invalid translit-std: \'', args['translit-std'] or '[missing]'}), args, template); end end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- common function to get args table from {{lang-??}} templates returns table of args ]] local function lang_xx_args_get (frame) local args = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if 1 == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-xx}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame); initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point ffrom another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-xx}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame); initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the ietf language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the ietf language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = 'yes' == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (language_name .. ' language', label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|<ietf tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the ietf language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = 'language: ' .. args[1] .. ' not found' -- language name not found, error message end else msg = 'missing language name' -- language name not provided, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ T R A N S L >---------------------------------------------------------------- Module entry point from another module ]] local function _transl (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transliteration|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (table.concat ({'unrecognized transliteration standard: ', args.translit_std}), args, 'Transliteration'); end else if is_set (args[2]) then -- [2] set when {{transliteration|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg ('no text', args, 'Transliteration'); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg ('missing language / script code', args, 'Transliteration'); end end end if is_set (args[1]) then -- IANA language code used for html lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (table.concat ({'unrecognized language / script code: ', args[1]}), args, 'Transliteration'); -- invalid language / script code end else return make_error_msg ('missing language / script code', args, 'Transliteration'); -- missing language / script code so quit end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, 'Transliteration'); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (table.concat ({'unrecognized language / script code: ', args.code}), args, 'Transliteration'); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic); end --[[--------------------------< T R A N S L >------------------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function transl (frame) return _transl (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = 'yes' == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}} ]] local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|<ietf tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, lang = lang, -- entry point for {{lang}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns ietf tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates transl = transl, -- entry point for {{transliteration}} _category_from_tag = _category_from_tag, -- entry points when this module is require()d into other modules _lang = _lang, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _transl = _transl, _translation_make = translation_make, }; b4bf37fa610695625e5f1ff5d33471dfaaf8af34 Template:Nihongo/doc 10 126 327 2023-07-29T09:42:33Z wikipedia>Fayenatic london 0 /* Error messaging */ update category link wikitext text/x-wiki {{Documentation subpage}} <!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). --> {{High-use}} {{COinS safe|n}} {{Lua|Module:Nihongo}} {{TOCright}} == Usage == This template marks the <code>[[kanji]]</code> segment as being in Japanese kanji and/or kana, which helps user agents (web browsers and so on) to display it correctly. {{details|topic=when to use this template|Wikipedia:Manual of Style (Japan-related articles)}} '''Syntax:''' {|class=wikitable |Without lead=yes |With lead=yes |- |<code><nowiki>{{Nihongo|</nowiki>&lt;{{var|english}}>&#124;&lt;{{var|kanji/kana}}>&#124;&lt;{{var|rōmaji}}>&#124;&lt;{{var|extra}}>&#124;&lt;{{var|extra2}}>}}</code> |<code><nowiki>{{Nihongo|</nowiki>&lt;{{var|english}}>&#124;&lt;{{var|kanji/kana}}>&#124;&lt;{{var|rōmaji}}>&#124;lead=yes&#124;extra=&lt;{{var|extra}}>&#124;extra2=&lt;{{var|extra2}}>}}</code> |} '''Parameters:''' * &lt;{{var|english}}>. Optional. The word as translated into English. Note that this will sometimes be the actual Japanese word due to it being adopted into English. * &lt;{{var|kanji/kana}}>. Required when &lt;{{var|rōmaji}}> is empty or omitted. The word as written using Japanese script (kanji, kana). * &lt;{{var|rōmaji}}>. Required when &lt;{{var|kanji/kana}}> is empty. Transliteration of the Japanese word, using Hepburn Romanization. * lead=yes. Optional. This should be used for the first instance of Japanese, usually in the lead. It gives the reader an idea what kind of non-English writing they are viewing. * &lt;{{var|extra}}>. Optional. Can be used to add a gloss (particularly if there is no English form). Can also be expressed as a named parameter, <code>extra=</code> * &lt;{{var|extra2}}>. Optional. Can also be expressed as a named parameter, <code>extra2=</code>. It is only useful in ";" definitions (extra2 will be displayed without bold, whereas text following the template will get the bold). === Examples === ;Regular use: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo|Tokyo Tower|東京タワー|Tōkyō tawā}}</nowiki></code> |- |'''Gives'''|| {{Nihongo|Tokyo Tower|東京タワー|Tōkyō tawā}} |} ;Use in lead: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo|Tokyo Tower|東京タワー|Tōkyō tawā|lead=yes}}</nowiki></code> |- |'''Gives'''|| {{Nihongo|Tokyo Tower|東京タワー|Tōkyō tawā|lead=yes}} |} ;Without <code>English</code>: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo||東京タワー|Tōkyō tawā}}</nowiki></code> |- |'''Gives'''|| {{Nihongo||東京タワー|Tōkyō tawā}} |} ;Without <code>English</code>, use in lead: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo||東京タワー|Tōkyō tawā|lead=yes}}</nowiki></code> |- |'''Gives'''|| {{Nihongo||東京タワー|Tōkyō tawā|lead=yes}} |} ;With <code>extra</code> to add a literal translation: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo|''Sokoban''|倉庫番|Sōko-ban|{{lit|warehouse keeper}}}}</nowiki></code> |- |'''Gives'''|| {{Nihongo|''Sokoban''|倉庫番|Sōko-ban|{{lit|warehouse keeper}}}} |} ;With <code>extra2</code>: {| CLASS="wikitable" |'''Code''' || <code><nowiki>; {{Nihongo||虚無僧|komusō|extra2='Priest of nothingness'}}</nowiki></code><BR /> <code><nowiki>: Mendicant priest of the Fuke sect of Zen Buddhism.</nowiki></code> |- |'''Gives'''|| ; {{Nihongo||虚無僧|komusō|extra2='Priest of nothingness'}} : Mendicant priest of the Fuke sect of Zen Buddhism. |} {{hatnote|Note: literal translations and linguistic glosses go in [[MOS:SINGLE|single quotation marks]], not double.}} ;Without <code>extra2</code>: {| CLASS="wikitable" |'''Code''' || <code><nowiki>; {{Nihongo||虚無僧|komusō}} 'Priest of nothingness'</nowiki></code><BR /> <code><nowiki>: Mendicant priest of the Fuke sect of Zen Buddhism.</nowiki></code> |- |'''Gives'''|| <!-- -->; {{Nihongo||虚無僧|komusō}} 'Priest of nothingness' <!-- -->: Mendicant priest of the Fuke sect of Zen Buddhism. |} === User style === [[Help:User style|User style]] can be set by adding code similar to <syntaxhighlight lang="css"> @media screen, tv { *[lang="ja"] { color: green; } }</syntaxhighlight> to [[Special:Mypage/common.css|common.css]]. ==Error messaging== This template emits one error message of its own: :<span class="error" style="font-size:100%">error: <nowiki>{{nihongo}}</nowiki>: Japanese or romaji text required</span> One of the positional parameters <code>&lt;{{var|kanji/kana}}></code> (<code><nowiki>{{{2}}}</nowiki></code>), the 'Japanese' referred to in the error message or <code>&lt;{{var|rōmaji}}></code> (<code><nowiki>{{{3}}}</nowiki></code>) is required for proper operation of this template. Articles with these errors are collected in {{clc|Nihongo template errors}}. This error often occurs because the template is malformed: :<code><nowiki>{{Nihongo|東京タワー}}</nowiki></code> instead of <code><nowiki>{{Nihongo||東京タワー}}</nowiki></code>; {{lang|ja|東京タワー}} is in <code><nowiki>{{{1}}}</nowiki></code> (<code>&lt;{{var|english}}></code>) instead of <code><nowiki>{{{2}}}</nowiki></code> (<code>&lt;{{var|kanji/kana}}></code>). To resolve this error, add the missing pipe (<code>|</code>) or consider using {{tlx|lang}} or {{tlx|transl}} Because this template uses {{tld|lang}} and {{tlx|transl}} which emit their own error messages, see the help text for those at: :{{cl|Lang and lang-xx template errors}} – for error messages emitted by {{tld|lang}} :{{cl|Transliteration template errors}} – for error messages emitted by {{tld|transl}} ==Limitations== This cannot be used within a Wikilink in an article or in any template or other page that is [[WP:Transclusion|transcluded]] into an article. == See also == * {{tlp|Lang-ja|...}},{{tlp|lang|ja|...}}, similar templates in the [[:Category:Lang-x templates|Lang-x template]] for marking up Japanese text * {{tl|Nihongo3}}, essentially the same as this template, but gives rōmaji first and English inside the parentheses * {{tl|Nihongo krt}}, essentially the same as this template, but gives kanji first with rōmaji and English inside the parentheses * {{tl|Nihongo foot}}, same as this version, but puts everything but the English into a footnote * {{tl|Nihongo2}}, also displays the kanji properly, but without adding anything in parentheses, without rōmaji and without the extra parameters * {{tlp|in lang|ja}}, to label sources written in Japanese * {{tl|Japanese}}, to request expert assistance with Japanese script == Template data == {{TemplateDataHeader}} <templatedata> { "description": "This template is used to display Japanese text, applying the correct code and formatting.", "params": { "1": { "label": "English text", "type": "string", "description": "The word as translated into English. Note this will sometimes be the actual Japanese word if it has been adopted into English." }, "2": { "label": "Kanji/kana text", "type": "string", "required": true, "description": "The word as written in Japanese (kanji, kana, Roman letters, and possibly other marks)." }, "3": { "label": "Romanized (rōmaji) text", "type": "string", "description": "Transliteration of the Japanese word, using Hepburn Romanization." }, "4": { "label": "Extra text inside parentheses", "type": "string", "description": "Adds extra text inside the parentheses. ", "aliases": [ "extra" ] }, "5": { "label": "Extra text outside parentheses", "type": "string", "description": "Adds extra text outside the parentheses. It is only useful in \";\" definitions (it will be displayed without bold, whereas text following the template, will be bolded). Literal translations and linguistic glosses must use single quotation marks, not double.", "aliases": [ "extra2" ] }, "lead": { "label": "Lead formatting", "type": "string", "description": "If set to yes, changes formatting style for the first instance of Japanese, usually in the lead. It gives the reader an idea what kind of non-English writing they are viewing.", "suggestedvalues": [ "yes" ] } }, "paramOrder": [ "1", "2", "3", "lead", "4", "5" ], "format": "inline" } </templatedata> <includeonly>{{Sandbox other|| <!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --> [[Category:Japonic multilingual support templates|{{PAGENAME}}]] [[Category:WikiProject Japan templates|Nihongo]] }}</includeonly> 3714173bbd073658d5f3f4d0d8b82784b815a77e Template:Documentation 10 49 169 95 2023-08-07T07:13:50Z meta>Nieuwsgierige Gebruiker 0 Undid revision 342625 by [[Special:Contributions/67.163.114.70|67.163.114.70]] ([[User talk:67.163.114.70|talk]]) wikitext text/x-wiki {{#invoke:Documentation|main}} bb08b6773a4c1e1d528cefda2d7c305d8b5193ec Template:Infobox 10 4 145 5 2023-08-28T04:05:10Z meta>Tali64³ 0 Undid revision 343934 by [[Special:Contributions/Corkscrew012|Corkscrew012]] ([[User talk:Corkscrew012|talk]]) Unconstructive editing; perhaps you posted your edit to the wrong wiki? wikitext text/x-wiki {{#invoke:Infobox|infobox}}<noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> adcda4ac544f8af340cf47833dc2960631593988 Module:Message box 828 9 15 2023-09-02T22:54:30Z wikipedia>Anomie 0 [[:File:Cscr-featured.svg]] needs a link to the description page for license and attribution. Add the ability for the configuration to specify a flag to accomplish this. Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) f2fb84f7b817d2d88747f57c40902a0d8be8158a Template:Markup 10 216 541 2023-09-13T11:00:00Z wikipedia>Nardog 0 fix conditional wikitext text/x-wiki <includeonly>{| style="{{#if:{{{width|}}}|width:{{{width}}};}} margin-top:0;margin-left:{{{margin-left|{{{margin|0}}}}}}; border-width:medium; padding:0; {{{style|}}}" {{#if:{{{title|}}} |{{!}}+ '''{{{title}}}'''}} {{#if:{{{noheaders|}}}{{{notitle|}}} | |! scope="col" style="width:50%;{{{colheaderstyle|}}}{{{col1headerstyle|}}}"{{!}} {{{col1|{{{t1|Markup}}}}}} {{!!}}<!-- -->scope="col" style="width:50%;{{{colheaderstyle|}}}{{{col2headerstyle|}}}"{{!}} {{{col2|{{{t2|Renders as}}}}}} }}<!-- -->{{For loop||call=format item|pc1n=template|pc1v=Markup/row|pc2n=c1style|pc2v={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|pc3n=c2style|pc3v={{{col2style|{{{outputstyle|}}}}}}|pv=item|{{item|c1={{{1|}}}|c2={{{2|}}}}}|{{item|c1={{{3|}}}|c2={{{4|}}}}}|{{item|c1={{{5|}}}|c2={{{6|}}}}}|{{item|c1={{{7|}}}|c2={{{8|}}}}}|{{item|c1={{{9|}}}|c2={{{10|}}}}}|{{item|c1={{{11|}}}|c2={{{12|}}}}}|{{item|c1={{{13|}}}|c2={{{14|}}}}}|{{item|c1={{{15|}}}|c2={{{16|}}}}}|{{item|c1={{{17|}}}|c2={{{18|}}}}}|{{item|c1={{{19|}}}|c2={{{20|}}}}}|{{item|c1={{{21|}}}|c2={{{22|}}}}}|{{item|c1={{{23|}}}|c2={{{24|}}}}}|{{item|c1={{{25|}}}|c2={{{26|}}}}}|{{item|c1={{{27|}}}|c2={{{28|}}}}}|{{item|c1={{{29|}}}|c2={{{30|}}}}}|{{item|c1={{{31|}}}|c2={{{32|}}}}}|{{item|c1={{{33|}}}|c2={{{34|}}}}}|{{item|c1={{{35|}}}|c2={{{36|}}}}}|{{item|c1={{{37|}}}|c2={{{38|}}}}}|{{item|c1={{{39|}}}|c2={{{40|}}}}}}} |- |style="border-width:1px;border-style: none none none;border-color:#ddd; padding:5px; vertical-align:top;"| |style="border-width:1px;border-style: none none none;border-color:#ddd; padding:5px; vertical-align:top;"| |}</includeonly><noinclude> {{Documentation}} </noinclude> 8f9e78df3cd9801aa6cb36c463195df132394e9a Module:Unicode data/scripts 828 105 283 2023-09-13T19:41:55Z wikipedia>Drmccreedy 0 Update for Unicode v15.1 Scribunto text/plain --[=[ -- Official Unicode script values for individual codepoints and ranges of -- codepoints. -- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided -- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- provided script codes corresponding to the names (see [[Script (Unicode)]]). --]=] local data = { singles = { [0x000AA] = "Latn", [0x000BA] = "Latn", [0x000D7] = "Zyyy", [0x000F7] = "Zyyy", [0x00374] = "Zyyy", [0x0037E] = "Zyyy", [0x0037F] = "Grek", [0x00384] = "Grek", [0x00385] = "Zyyy", [0x00386] = "Grek", [0x00387] = "Zyyy", [0x0038C] = "Grek", [0x00605] = "Zyyy", [0x0060C] = "Zyyy", [0x0061B] = "Zyyy", [0x0061F] = "Zyyy", [0x00640] = "Zyyy", [0x00670] = "Zinh", [0x006DD] = "Zyyy", [0x0085E] = "Mand", [0x008E2] = "Zyyy", [0x009B2] = "Beng", [0x009D7] = "Beng", [0x00A3C] = "Guru", [0x00A51] = "Guru", [0x00A5E] = "Guru", [0x00AD0] = "Gujr", [0x00B9C] = "Taml", [0x00BD0] = "Taml", [0x00BD7] = "Taml", [0x00C5D] = "Telu", [0x00DBD] = "Sinh", [0x00DCA] = "Sinh", [0x00DD6] = "Sinh", [0x00E3F] = "Zyyy", [0x00E84] = "Laoo", [0x00EA5] = "Laoo", [0x00EC6] = "Laoo", [0x010C7] = "Geor", [0x010CD] = "Geor", [0x010FB] = "Zyyy", [0x01258] = "Ethi", [0x012C0] = "Ethi", [0x0171F] = "Tglg", [0x01804] = "Mong", [0x01805] = "Zyyy", [0x01940] = "Limb", [0x01CD3] = "Zyyy", [0x01CE1] = "Zyyy", [0x01CED] = "Zinh", [0x01CF4] = "Zinh", [0x01CFA] = "Zyyy", [0x01D2B] = "Cyrl", [0x01D78] = "Cyrl", [0x01DBF] = "Grek", [0x01F59] = "Grek", [0x01F5B] = "Grek", [0x01F5D] = "Grek", [0x02071] = "Latn", [0x0207F] = "Latn", [0x02126] = "Grek", [0x02132] = "Latn", [0x0214E] = "Latn", [0x02D27] = "Geor", [0x02D2D] = "Geor", [0x02D7F] = "Tfng", [0x03005] = "Hani", [0x03006] = "Zyyy", [0x03007] = "Hani", [0x030A0] = "Zyyy", [0x031EF] = "Zyyy", [0x032FF] = "Zyyy", [0x0A7D3] = "Latn", [0x0A92E] = "Zyyy", [0x0A92F] = "Kali", [0x0A95F] = "Rjng", [0x0A9CF] = "Zyyy", [0x0AB5B] = "Zyyy", [0x0AB65] = "Grek", [0x0FB3E] = "Hebr", [0x0FDCF] = "Arab", [0x0FEFF] = "Zyyy", [0x0FF70] = "Zyyy", [0x101A0] = "Grek", [0x101FD] = "Zinh", [0x102E0] = "Zinh", [0x1039F] = "Ugar", [0x1056F] = "Aghb", [0x10808] = "Cprt", [0x1083C] = "Cprt", [0x1083F] = "Cprt", [0x1091F] = "Phnx", [0x1093F] = "Lydi", [0x1107F] = "Brah", [0x110CD] = "Kthi", [0x11288] = "Mult", [0x1133B] = "Zinh", [0x11350] = "Gran", [0x11357] = "Gran", [0x118FF] = "Wara", [0x11909] = "Diak", [0x11D3A] = "Gonm", [0x11FB0] = "Lisu", [0x11FFF] = "Taml", [0x16FE0] = "Tang", [0x16FE1] = "Nshu", [0x16FE4] = "Kits", [0x1B000] = "Kana", [0x1B132] = "Hira", [0x1B155] = "Kana", [0x1D4A2] = "Zyyy", [0x1D4BB] = "Zyyy", [0x1D546] = "Zyyy", [0x1E08F] = "Cyrl", [0x1E2FF] = "Wcho", [0x1EE24] = "Arab", [0x1EE27] = "Arab", [0x1EE39] = "Arab", [0x1EE3B] = "Arab", [0x1EE42] = "Arab", [0x1EE47] = "Arab", [0x1EE49] = "Arab", [0x1EE4B] = "Arab", [0x1EE54] = "Arab", [0x1EE57] = "Arab", [0x1EE59] = "Arab", [0x1EE5B] = "Arab", [0x1EE5D] = "Arab", [0x1EE5F] = "Arab", [0x1EE64] = "Arab", [0x1EE7E] = "Arab", [0x1F200] = "Hira", [0x1F7F0] = "Zyyy", [0xE0001] = "Zyyy", }, ranges = { { 0x00000, 0x00040, "Zyyy" }, { 0x00041, 0x0005A, "Latn" }, { 0x0005B, 0x00060, "Zyyy" }, { 0x00061, 0x0007A, "Latn" }, { 0x0007B, 0x000A9, "Zyyy" }, { 0x000AB, 0x000B9, "Zyyy" }, { 0x000BB, 0x000BF, "Zyyy" }, { 0x000C0, 0x000D6, "Latn" }, { 0x000D8, 0x000F6, "Latn" }, { 0x000F8, 0x002B8, "Latn" }, { 0x002B9, 0x002DF, "Zyyy" }, { 0x002E0, 0x002E4, "Latn" }, { 0x002E5, 0x002E9, "Zyyy" }, { 0x002EA, 0x002EB, "Bopo" }, { 0x002EC, 0x002FF, "Zyyy" }, { 0x00300, 0x0036F, "Zinh" }, { 0x00370, 0x00373, "Grek" }, { 0x00375, 0x00377, "Grek" }, { 0x0037A, 0x0037D, "Grek" }, { 0x00388, 0x0038A, "Grek" }, { 0x0038E, 0x003A1, "Grek" }, { 0x003A3, 0x003E1, "Grek" }, { 0x003E2, 0x003EF, "Copt" }, { 0x003F0, 0x003FF, "Grek" }, { 0x00400, 0x00484, "Cyrl" }, { 0x00485, 0x00486, "Zinh" }, { 0x00487, 0x0052F, "Cyrl" }, { 0x00531, 0x00556, "Armn" }, { 0x00559, 0x0058A, "Armn" }, { 0x0058D, 0x0058F, "Armn" }, { 0x00591, 0x005C7, "Hebr" }, { 0x005D0, 0x005EA, "Hebr" }, { 0x005EF, 0x005F4, "Hebr" }, { 0x00600, 0x00604, "Arab" }, { 0x00606, 0x0060B, "Arab" }, { 0x0060D, 0x0061A, "Arab" }, { 0x0061C, 0x0061E, "Arab" }, { 0x00620, 0x0063F, "Arab" }, { 0x00641, 0x0064A, "Arab" }, { 0x0064B, 0x00655, "Zinh" }, { 0x00656, 0x0066F, "Arab" }, { 0x00671, 0x006DC, "Arab" }, { 0x006DE, 0x006FF, "Arab" }, { 0x00700, 0x0070D, "Syrc" }, { 0x0070F, 0x0074A, "Syrc" }, { 0x0074D, 0x0074F, "Syrc" }, { 0x00750, 0x0077F, "Arab" }, { 0x00780, 0x007B1, "Thaa" }, { 0x007C0, 0x007FA, "Nkoo" }, { 0x007FD, 0x007FF, "Nkoo" }, { 0x00800, 0x0082D, "Samr" }, { 0x00830, 0x0083E, "Samr" }, { 0x00840, 0x0085B, "Mand" }, { 0x00860, 0x0086A, "Syrc" }, { 0x00870, 0x0088E, "Arab" }, { 0x00890, 0x00891, "Arab" }, { 0x00898, 0x008E1, "Arab" }, { 0x008E3, 0x008FF, "Arab" }, { 0x00900, 0x00950, "Deva" }, { 0x00951, 0x00954, "Zinh" }, { 0x00955, 0x00963, "Deva" }, { 0x00964, 0x00965, "Zyyy" }, { 0x00966, 0x0097F, "Deva" }, { 0x00980, 0x00983, "Beng" }, { 0x00985, 0x0098C, "Beng" }, { 0x0098F, 0x00990, "Beng" }, { 0x00993, 0x009A8, "Beng" }, { 0x009AA, 0x009B0, "Beng" }, { 0x009B6, 0x009B9, "Beng" }, { 0x009BC, 0x009C4, "Beng" }, { 0x009C7, 0x009C8, "Beng" }, { 0x009CB, 0x009CE, "Beng" }, { 0x009DC, 0x009DD, "Beng" }, { 0x009DF, 0x009E3, "Beng" }, { 0x009E6, 0x009FE, "Beng" }, { 0x00A01, 0x00A03, "Guru" }, { 0x00A05, 0x00A0A, "Guru" }, { 0x00A0F, 0x00A10, "Guru" }, { 0x00A13, 0x00A28, "Guru" }, { 0x00A2A, 0x00A30, "Guru" }, { 0x00A32, 0x00A33, "Guru" }, { 0x00A35, 0x00A36, "Guru" }, { 0x00A38, 0x00A39, "Guru" }, { 0x00A3E, 0x00A42, "Guru" }, { 0x00A47, 0x00A48, "Guru" }, { 0x00A4B, 0x00A4D, "Guru" }, { 0x00A59, 0x00A5C, "Guru" }, { 0x00A66, 0x00A76, "Guru" }, { 0x00A81, 0x00A83, "Gujr" }, { 0x00A85, 0x00A8D, "Gujr" }, { 0x00A8F, 0x00A91, "Gujr" }, { 0x00A93, 0x00AA8, "Gujr" }, { 0x00AAA, 0x00AB0, "Gujr" }, { 0x00AB2, 0x00AB3, "Gujr" }, { 0x00AB5, 0x00AB9, "Gujr" }, { 0x00ABC, 0x00AC5, "Gujr" }, { 0x00AC7, 0x00AC9, "Gujr" }, { 0x00ACB, 0x00ACD, "Gujr" }, { 0x00AE0, 0x00AE3, "Gujr" }, { 0x00AE6, 0x00AF1, "Gujr" }, { 0x00AF9, 0x00AFF, "Gujr" }, { 0x00B01, 0x00B03, "Orya" }, { 0x00B05, 0x00B0C, "Orya" }, { 0x00B0F, 0x00B10, "Orya" }, { 0x00B13, 0x00B28, "Orya" }, { 0x00B2A, 0x00B30, "Orya" }, { 0x00B32, 0x00B33, "Orya" }, { 0x00B35, 0x00B39, "Orya" }, { 0x00B3C, 0x00B44, "Orya" }, { 0x00B47, 0x00B48, "Orya" }, { 0x00B4B, 0x00B4D, "Orya" }, { 0x00B55, 0x00B57, "Orya" }, { 0x00B5C, 0x00B5D, "Orya" }, { 0x00B5F, 0x00B63, "Orya" }, { 0x00B66, 0x00B77, "Orya" }, { 0x00B82, 0x00B83, "Taml" }, { 0x00B85, 0x00B8A, "Taml" }, { 0x00B8E, 0x00B90, "Taml" }, { 0x00B92, 0x00B95, "Taml" }, { 0x00B99, 0x00B9A, "Taml" }, { 0x00B9E, 0x00B9F, "Taml" }, { 0x00BA3, 0x00BA4, "Taml" }, { 0x00BA8, 0x00BAA, "Taml" }, { 0x00BAE, 0x00BB9, "Taml" }, { 0x00BBE, 0x00BC2, "Taml" }, { 0x00BC6, 0x00BC8, "Taml" }, { 0x00BCA, 0x00BCD, "Taml" }, { 0x00BE6, 0x00BFA, "Taml" }, { 0x00C00, 0x00C0C, "Telu" }, { 0x00C0E, 0x00C10, "Telu" }, { 0x00C12, 0x00C28, "Telu" }, { 0x00C2A, 0x00C39, "Telu" }, { 0x00C3C, 0x00C44, "Telu" }, { 0x00C46, 0x00C48, "Telu" }, { 0x00C4A, 0x00C4D, "Telu" }, { 0x00C55, 0x00C56, "Telu" }, { 0x00C58, 0x00C5A, "Telu" }, { 0x00C60, 0x00C63, "Telu" }, { 0x00C66, 0x00C6F, "Telu" }, { 0x00C77, 0x00C7F, "Telu" }, { 0x00C80, 0x00C8C, "Knda" }, { 0x00C8E, 0x00C90, "Knda" }, { 0x00C92, 0x00CA8, "Knda" }, { 0x00CAA, 0x00CB3, "Knda" }, { 0x00CB5, 0x00CB9, "Knda" }, { 0x00CBC, 0x00CC4, "Knda" }, { 0x00CC6, 0x00CC8, "Knda" }, { 0x00CCA, 0x00CCD, "Knda" }, { 0x00CD5, 0x00CD6, "Knda" }, { 0x00CDD, 0x00CDE, "Knda" }, { 0x00CE0, 0x00CE3, "Knda" }, { 0x00CE6, 0x00CEF, "Knda" }, { 0x00CF1, 0x00CF3, "Knda" }, { 0x00D00, 0x00D0C, "Mlym" }, { 0x00D0E, 0x00D10, "Mlym" }, { 0x00D12, 0x00D44, "Mlym" }, { 0x00D46, 0x00D48, "Mlym" }, { 0x00D4A, 0x00D4F, "Mlym" }, { 0x00D54, 0x00D63, "Mlym" }, { 0x00D66, 0x00D7F, "Mlym" }, { 0x00D81, 0x00D83, "Sinh" }, { 0x00D85, 0x00D96, "Sinh" }, { 0x00D9A, 0x00DB1, "Sinh" }, { 0x00DB3, 0x00DBB, "Sinh" }, { 0x00DC0, 0x00DC6, "Sinh" }, { 0x00DCF, 0x00DD4, "Sinh" }, { 0x00DD8, 0x00DDF, "Sinh" }, { 0x00DE6, 0x00DEF, "Sinh" }, { 0x00DF2, 0x00DF4, "Sinh" }, { 0x00E01, 0x00E3A, "Thai" }, { 0x00E40, 0x00E5B, "Thai" }, { 0x00E81, 0x00E82, "Laoo" }, { 0x00E86, 0x00E8A, "Laoo" }, { 0x00E8C, 0x00EA3, "Laoo" }, { 0x00EA7, 0x00EBD, "Laoo" }, { 0x00EC0, 0x00EC4, "Laoo" }, { 0x00EC8, 0x00ECE, "Laoo" }, { 0x00ED0, 0x00ED9, "Laoo" }, { 0x00EDC, 0x00EDF, "Laoo" }, { 0x00F00, 0x00F47, "Tibt" }, { 0x00F49, 0x00F6C, "Tibt" }, { 0x00F71, 0x00F97, "Tibt" }, { 0x00F99, 0x00FBC, "Tibt" }, { 0x00FBE, 0x00FCC, "Tibt" }, { 0x00FCE, 0x00FD4, "Tibt" }, { 0x00FD5, 0x00FD8, "Zyyy" }, { 0x00FD9, 0x00FDA, "Tibt" }, { 0x01000, 0x0109F, "Mymr" }, { 0x010A0, 0x010C5, "Geor" }, { 0x010D0, 0x010FA, "Geor" }, { 0x010FC, 0x010FF, "Geor" }, { 0x01100, 0x011FF, "Hang" }, { 0x01200, 0x01248, "Ethi" }, { 0x0124A, 0x0124D, "Ethi" }, { 0x01250, 0x01256, "Ethi" }, { 0x0125A, 0x0125D, "Ethi" }, { 0x01260, 0x01288, "Ethi" }, { 0x0128A, 0x0128D, "Ethi" }, { 0x01290, 0x012B0, "Ethi" }, { 0x012B2, 0x012B5, "Ethi" }, { 0x012B8, 0x012BE, "Ethi" }, { 0x012C2, 0x012C5, "Ethi" }, { 0x012C8, 0x012D6, "Ethi" }, { 0x012D8, 0x01310, "Ethi" }, { 0x01312, 0x01315, "Ethi" }, { 0x01318, 0x0135A, "Ethi" }, { 0x0135D, 0x0137C, "Ethi" }, { 0x01380, 0x01399, "Ethi" }, { 0x013A0, 0x013F5, "Cher" }, { 0x013F8, 0x013FD, "Cher" }, { 0x01400, 0x0167F, "Cans" }, { 0x01680, 0x0169C, "Ogam" }, { 0x016A0, 0x016EA, "Runr" }, { 0x016EB, 0x016ED, "Zyyy" }, { 0x016EE, 0x016F8, "Runr" }, { 0x01700, 0x01715, "Tglg" }, { 0x01720, 0x01734, "Hano" }, { 0x01735, 0x01736, "Zyyy" }, { 0x01740, 0x01753, "Buhd" }, { 0x01760, 0x0176C, "Tagb" }, { 0x0176E, 0x01770, "Tagb" }, { 0x01772, 0x01773, "Tagb" }, { 0x01780, 0x017DD, "Khmr" }, { 0x017E0, 0x017E9, "Khmr" }, { 0x017F0, 0x017F9, "Khmr" }, { 0x01800, 0x01801, "Mong" }, { 0x01802, 0x01803, "Zyyy" }, { 0x01806, 0x01819, "Mong" }, { 0x01820, 0x01878, "Mong" }, { 0x01880, 0x018AA, "Mong" }, { 0x018B0, 0x018F5, "Cans" }, { 0x01900, 0x0191E, "Limb" }, { 0x01920, 0x0192B, "Limb" }, { 0x01930, 0x0193B, "Limb" }, { 0x01944, 0x0194F, "Limb" }, { 0x01950, 0x0196D, "Tale" }, { 0x01970, 0x01974, "Tale" }, { 0x01980, 0x019AB, "Talu" }, { 0x019B0, 0x019C9, "Talu" }, { 0x019D0, 0x019DA, "Talu" }, { 0x019DE, 0x019DF, "Talu" }, { 0x019E0, 0x019FF, "Khmr" }, { 0x01A00, 0x01A1B, "Bugi" }, { 0x01A1E, 0x01A1F, "Bugi" }, { 0x01A20, 0x01A5E, "Lana" }, { 0x01A60, 0x01A7C, "Lana" }, { 0x01A7F, 0x01A89, "Lana" }, { 0x01A90, 0x01A99, "Lana" }, { 0x01AA0, 0x01AAD, "Lana" }, { 0x01AB0, 0x01ACE, "Zinh" }, { 0x01B00, 0x01B4C, "Bali" }, { 0x01B50, 0x01B7E, "Bali" }, { 0x01B80, 0x01BBF, "Sund" }, { 0x01BC0, 0x01BF3, "Batk" }, { 0x01BFC, 0x01BFF, "Batk" }, { 0x01C00, 0x01C37, "Lepc" }, { 0x01C3B, 0x01C49, "Lepc" }, { 0x01C4D, 0x01C4F, "Lepc" }, { 0x01C50, 0x01C7F, "Olck" }, { 0x01C80, 0x01C88, "Cyrl" }, { 0x01C90, 0x01CBA, "Geor" }, { 0x01CBD, 0x01CBF, "Geor" }, { 0x01CC0, 0x01CC7, "Sund" }, { 0x01CD0, 0x01CD2, "Zinh" }, { 0x01CD4, 0x01CE0, "Zinh" }, { 0x01CE2, 0x01CE8, "Zinh" }, { 0x01CE9, 0x01CEC, "Zyyy" }, { 0x01CEE, 0x01CF3, "Zyyy" }, { 0x01CF5, 0x01CF7, "Zyyy" }, { 0x01CF8, 0x01CF9, "Zinh" }, { 0x01D00, 0x01D25, "Latn" }, { 0x01D26, 0x01D2A, "Grek" }, { 0x01D2C, 0x01D5C, "Latn" }, { 0x01D5D, 0x01D61, "Grek" }, { 0x01D62, 0x01D65, "Latn" }, { 0x01D66, 0x01D6A, "Grek" }, { 0x01D6B, 0x01D77, "Latn" }, { 0x01D79, 0x01DBE, "Latn" }, { 0x01DC0, 0x01DFF, "Zinh" }, { 0x01E00, 0x01EFF, "Latn" }, { 0x01F00, 0x01F15, "Grek" }, { 0x01F18, 0x01F1D, "Grek" }, { 0x01F20, 0x01F45, "Grek" }, { 0x01F48, 0x01F4D, "Grek" }, { 0x01F50, 0x01F57, "Grek" }, { 0x01F5F, 0x01F7D, "Grek" }, { 0x01F80, 0x01FB4, "Grek" }, { 0x01FB6, 0x01FC4, "Grek" }, { 0x01FC6, 0x01FD3, "Grek" }, { 0x01FD6, 0x01FDB, "Grek" }, { 0x01FDD, 0x01FEF, "Grek" }, { 0x01FF2, 0x01FF4, "Grek" }, { 0x01FF6, 0x01FFE, "Grek" }, { 0x02000, 0x0200B, "Zyyy" }, { 0x0200C, 0x0200D, "Zinh" }, { 0x0200E, 0x02064, "Zyyy" }, { 0x02066, 0x02070, "Zyyy" }, { 0x02074, 0x0207E, "Zyyy" }, { 0x02080, 0x0208E, "Zyyy" }, { 0x02090, 0x0209C, "Latn" }, { 0x020A0, 0x020C0, "Zyyy" }, { 0x020D0, 0x020F0, "Zinh" }, { 0x02100, 0x02125, "Zyyy" }, { 0x02127, 0x02129, "Zyyy" }, { 0x0212A, 0x0212B, "Latn" }, { 0x0212C, 0x02131, "Zyyy" }, { 0x02133, 0x0214D, "Zyyy" }, { 0x0214F, 0x0215F, "Zyyy" }, { 0x02160, 0x02188, "Latn" }, { 0x02189, 0x0218B, "Zyyy" }, { 0x02190, 0x02426, "Zyyy" }, { 0x02440, 0x0244A, "Zyyy" }, { 0x02460, 0x027FF, "Zyyy" }, { 0x02800, 0x028FF, "Brai" }, { 0x02900, 0x02B73, "Zyyy" }, { 0x02B76, 0x02B95, "Zyyy" }, { 0x02B97, 0x02BFF, "Zyyy" }, { 0x02C00, 0x02C5F, "Glag" }, { 0x02C60, 0x02C7F, "Latn" }, { 0x02C80, 0x02CF3, "Copt" }, { 0x02CF9, 0x02CFF, "Copt" }, { 0x02D00, 0x02D25, "Geor" }, { 0x02D30, 0x02D67, "Tfng" }, { 0x02D6F, 0x02D70, "Tfng" }, { 0x02D80, 0x02D96, "Ethi" }, { 0x02DA0, 0x02DA6, "Ethi" }, { 0x02DA8, 0x02DAE, "Ethi" }, { 0x02DB0, 0x02DB6, "Ethi" }, { 0x02DB8, 0x02DBE, "Ethi" }, { 0x02DC0, 0x02DC6, "Ethi" }, { 0x02DC8, 0x02DCE, "Ethi" }, { 0x02DD0, 0x02DD6, "Ethi" }, { 0x02DD8, 0x02DDE, "Ethi" }, { 0x02DE0, 0x02DFF, "Cyrl" }, { 0x02E00, 0x02E5D, "Zyyy" }, { 0x02E80, 0x02E99, "Hani" }, { 0x02E9B, 0x02EF3, "Hani" }, { 0x02F00, 0x02FD5, "Hani" }, { 0x02FF0, 0x03004, "Zyyy" }, { 0x03008, 0x03020, "Zyyy" }, { 0x03021, 0x03029, "Hani" }, { 0x0302A, 0x0302D, "Zinh" }, { 0x0302E, 0x0302F, "Hang" }, { 0x03030, 0x03037, "Zyyy" }, { 0x03038, 0x0303B, "Hani" }, { 0x0303C, 0x0303F, "Zyyy" }, { 0x03041, 0x03096, "Hira" }, { 0x03099, 0x0309A, "Zinh" }, { 0x0309B, 0x0309C, "Zyyy" }, { 0x0309D, 0x0309F, "Hira" }, { 0x030A1, 0x030FA, "Kana" }, { 0x030FB, 0x030FC, "Zyyy" }, { 0x030FD, 0x030FF, "Kana" }, { 0x03105, 0x0312F, "Bopo" }, { 0x03131, 0x0318E, "Hang" }, { 0x03190, 0x0319F, "Zyyy" }, { 0x031A0, 0x031BF, "Bopo" }, { 0x031C0, 0x031E3, "Zyyy" }, { 0x031F0, 0x031FF, "Kana" }, { 0x03200, 0x0321E, "Hang" }, { 0x03220, 0x0325F, "Zyyy" }, { 0x03260, 0x0327E, "Hang" }, { 0x0327F, 0x032CF, "Zyyy" }, { 0x032D0, 0x032FE, "Kana" }, { 0x03300, 0x03357, "Kana" }, { 0x03358, 0x033FF, "Zyyy" }, { 0x03400, 0x04DBF, "Hani" }, { 0x04DC0, 0x04DFF, "Zyyy" }, { 0x04E00, 0x09FFF, "Hani" }, { 0x0A000, 0x0A48C, "Yiii" }, { 0x0A490, 0x0A4C6, "Yiii" }, { 0x0A4D0, 0x0A4FF, "Lisu" }, { 0x0A500, 0x0A62B, "Vaii" }, { 0x0A640, 0x0A69F, "Cyrl" }, { 0x0A6A0, 0x0A6F7, "Bamu" }, { 0x0A700, 0x0A721, "Zyyy" }, { 0x0A722, 0x0A787, "Latn" }, { 0x0A788, 0x0A78A, "Zyyy" }, { 0x0A78B, 0x0A7CA, "Latn" }, { 0x0A7D0, 0x0A7D1, "Latn" }, { 0x0A7D5, 0x0A7D9, "Latn" }, { 0x0A7F2, 0x0A7FF, "Latn" }, { 0x0A800, 0x0A82C, "Sylo" }, { 0x0A830, 0x0A839, "Zyyy" }, { 0x0A840, 0x0A877, "Phag" }, { 0x0A880, 0x0A8C5, "Saur" }, { 0x0A8CE, 0x0A8D9, "Saur" }, { 0x0A8E0, 0x0A8FF, "Deva" }, { 0x0A900, 0x0A92D, "Kali" }, { 0x0A930, 0x0A953, "Rjng" }, { 0x0A960, 0x0A97C, "Hang" }, { 0x0A980, 0x0A9CD, "Java" }, { 0x0A9D0, 0x0A9D9, "Java" }, { 0x0A9DE, 0x0A9DF, "Java" }, { 0x0A9E0, 0x0A9FE, "Mymr" }, { 0x0AA00, 0x0AA36, "Cham" }, { 0x0AA40, 0x0AA4D, "Cham" }, { 0x0AA50, 0x0AA59, "Cham" }, { 0x0AA5C, 0x0AA5F, "Cham" }, { 0x0AA60, 0x0AA7F, "Mymr" }, { 0x0AA80, 0x0AAC2, "Tavt" }, { 0x0AADB, 0x0AADF, "Tavt" }, { 0x0AAE0, 0x0AAF6, "Mtei" }, { 0x0AB01, 0x0AB06, "Ethi" }, { 0x0AB09, 0x0AB0E, "Ethi" }, { 0x0AB11, 0x0AB16, "Ethi" }, { 0x0AB20, 0x0AB26, "Ethi" }, { 0x0AB28, 0x0AB2E, "Ethi" }, { 0x0AB30, 0x0AB5A, "Latn" }, { 0x0AB5C, 0x0AB64, "Latn" }, { 0x0AB66, 0x0AB69, "Latn" }, { 0x0AB6A, 0x0AB6B, "Zyyy" }, { 0x0AB70, 0x0ABBF, "Cher" }, { 0x0ABC0, 0x0ABED, "Mtei" }, { 0x0ABF0, 0x0ABF9, "Mtei" }, { 0x0AC00, 0x0D7A3, "Hang" }, { 0x0D7B0, 0x0D7C6, "Hang" }, { 0x0D7CB, 0x0D7FB, "Hang" }, { 0x0F900, 0x0FA6D, "Hani" }, { 0x0FA70, 0x0FAD9, "Hani" }, { 0x0FB00, 0x0FB06, "Latn" }, { 0x0FB13, 0x0FB17, "Armn" }, { 0x0FB1D, 0x0FB36, "Hebr" }, { 0x0FB38, 0x0FB3C, "Hebr" }, { 0x0FB40, 0x0FB41, "Hebr" }, { 0x0FB43, 0x0FB44, "Hebr" }, { 0x0FB46, 0x0FB4F, "Hebr" }, { 0x0FB50, 0x0FBC2, "Arab" }, { 0x0FBD3, 0x0FD3D, "Arab" }, { 0x0FD3E, 0x0FD3F, "Zyyy" }, { 0x0FD40, 0x0FD8F, "Arab" }, { 0x0FD92, 0x0FDC7, "Arab" }, { 0x0FDF0, 0x0FDFF, "Arab" }, { 0x0FE00, 0x0FE0F, "Zinh" }, { 0x0FE10, 0x0FE19, "Zyyy" }, { 0x0FE20, 0x0FE2D, "Zinh" }, { 0x0FE2E, 0x0FE2F, "Cyrl" }, { 0x0FE30, 0x0FE52, "Zyyy" }, { 0x0FE54, 0x0FE66, "Zyyy" }, { 0x0FE68, 0x0FE6B, "Zyyy" }, { 0x0FE70, 0x0FE74, "Arab" }, { 0x0FE76, 0x0FEFC, "Arab" }, { 0x0FF01, 0x0FF20, "Zyyy" }, { 0x0FF21, 0x0FF3A, "Latn" }, { 0x0FF3B, 0x0FF40, "Zyyy" }, { 0x0FF41, 0x0FF5A, "Latn" }, { 0x0FF5B, 0x0FF65, "Zyyy" }, { 0x0FF66, 0x0FF6F, "Kana" }, { 0x0FF71, 0x0FF9D, "Kana" }, { 0x0FF9E, 0x0FF9F, "Zyyy" }, { 0x0FFA0, 0x0FFBE, "Hang" }, { 0x0FFC2, 0x0FFC7, "Hang" }, { 0x0FFCA, 0x0FFCF, "Hang" }, { 0x0FFD2, 0x0FFD7, "Hang" }, { 0x0FFDA, 0x0FFDC, "Hang" }, { 0x0FFE0, 0x0FFE6, "Zyyy" }, { 0x0FFE8, 0x0FFEE, "Zyyy" }, { 0x0FFF9, 0x0FFFD, "Zyyy" }, { 0x10000, 0x1000B, "Linb" }, { 0x1000D, 0x10026, "Linb" }, { 0x10028, 0x1003A, "Linb" }, { 0x1003C, 0x1003D, "Linb" }, { 0x1003F, 0x1004D, "Linb" }, { 0x10050, 0x1005D, "Linb" }, { 0x10080, 0x100FA, "Linb" }, { 0x10100, 0x10102, "Zyyy" }, { 0x10107, 0x10133, "Zyyy" }, { 0x10137, 0x1013F, "Zyyy" }, { 0x10140, 0x1018E, "Grek" }, { 0x10190, 0x1019C, "Zyyy" }, { 0x101D0, 0x101FC, "Zyyy" }, { 0x10280, 0x1029C, "Lyci" }, { 0x102A0, 0x102D0, "Cari" }, { 0x102E1, 0x102FB, "Zyyy" }, { 0x10300, 0x10323, "Ital" }, { 0x1032D, 0x1032F, "Ital" }, { 0x10330, 0x1034A, "Goth" }, { 0x10350, 0x1037A, "Perm" }, { 0x10380, 0x1039D, "Ugar" }, { 0x103A0, 0x103C3, "Xpeo" }, { 0x103C8, 0x103D5, "Xpeo" }, { 0x10400, 0x1044F, "Dsrt" }, { 0x10450, 0x1047F, "Shaw" }, { 0x10480, 0x1049D, "Osma" }, { 0x104A0, 0x104A9, "Osma" }, { 0x104B0, 0x104D3, "Osge" }, { 0x104D8, 0x104FB, "Osge" }, { 0x10500, 0x10527, "Elba" }, { 0x10530, 0x10563, "Aghb" }, { 0x10570, 0x1057A, "Vith" }, { 0x1057C, 0x1058A, "Vith" }, { 0x1058C, 0x10592, "Vith" }, { 0x10594, 0x10595, "Vith" }, { 0x10597, 0x105A1, "Vith" }, { 0x105A3, 0x105B1, "Vith" }, { 0x105B3, 0x105B9, "Vith" }, { 0x105BB, 0x105BC, "Vith" }, { 0x10600, 0x10736, "Lina" }, { 0x10740, 0x10755, "Lina" }, { 0x10760, 0x10767, "Lina" }, { 0x10780, 0x10785, "Latn" }, { 0x10787, 0x107B0, "Latn" }, { 0x107B2, 0x107BA, "Latn" }, { 0x10800, 0x10805, "Cprt" }, { 0x1080A, 0x10835, "Cprt" }, { 0x10837, 0x10838, "Cprt" }, { 0x10840, 0x10855, "Armi" }, { 0x10857, 0x1085F, "Armi" }, { 0x10860, 0x1087F, "Palm" }, { 0x10880, 0x1089E, "Nbat" }, { 0x108A7, 0x108AF, "Nbat" }, { 0x108E0, 0x108F2, "Hatr" }, { 0x108F4, 0x108F5, "Hatr" }, { 0x108FB, 0x108FF, "Hatr" }, { 0x10900, 0x1091B, "Phnx" }, { 0x10920, 0x10939, "Lydi" }, { 0x10980, 0x1099F, "Mero" }, { 0x109A0, 0x109B7, "Merc" }, { 0x109BC, 0x109CF, "Merc" }, { 0x109D2, 0x109FF, "Merc" }, { 0x10A00, 0x10A03, "Khar" }, { 0x10A05, 0x10A06, "Khar" }, { 0x10A0C, 0x10A13, "Khar" }, { 0x10A15, 0x10A17, "Khar" }, { 0x10A19, 0x10A35, "Khar" }, { 0x10A38, 0x10A3A, "Khar" }, { 0x10A3F, 0x10A48, "Khar" }, { 0x10A50, 0x10A58, "Khar" }, { 0x10A60, 0x10A7F, "Sarb" }, { 0x10A80, 0x10A9F, "Narb" }, { 0x10AC0, 0x10AE6, "Mani" }, { 0x10AEB, 0x10AF6, "Mani" }, { 0x10B00, 0x10B35, "Avst" }, { 0x10B39, 0x10B3F, "Avst" }, { 0x10B40, 0x10B55, "Prti" }, { 0x10B58, 0x10B5F, "Prti" }, { 0x10B60, 0x10B72, "Phli" }, { 0x10B78, 0x10B7F, "Phli" }, { 0x10B80, 0x10B91, "Phlp" }, { 0x10B99, 0x10B9C, "Phlp" }, { 0x10BA9, 0x10BAF, "Phlp" }, { 0x10C00, 0x10C48, "Orkh" }, { 0x10C80, 0x10CB2, "Hung" }, { 0x10CC0, 0x10CF2, "Hung" }, { 0x10CFA, 0x10CFF, "Hung" }, { 0x10D00, 0x10D27, "Rohg" }, { 0x10D30, 0x10D39, "Rohg" }, { 0x10E60, 0x10E7E, "Arab" }, { 0x10E80, 0x10EA9, "Yezi" }, { 0x10EAB, 0x10EAD, "Yezi" }, { 0x10EB0, 0x10EB1, "Yezi" }, { 0x10EFD, 0x10EFF, "Arab" }, { 0x10F00, 0x10F27, "Sogo" }, { 0x10F30, 0x10F59, "Sogd" }, { 0x10F70, 0x10F89, "Ougr" }, { 0x10FB0, 0x10FCB, "Chrs" }, { 0x10FE0, 0x10FF6, "Elym" }, { 0x11000, 0x1104D, "Brah" }, { 0x11052, 0x11075, "Brah" }, { 0x11080, 0x110C2, "Kthi" }, { 0x110D0, 0x110E8, "Sora" }, { 0x110F0, 0x110F9, "Sora" }, { 0x11100, 0x11134, "Cakm" }, { 0x11136, 0x11147, "Cakm" }, { 0x11150, 0x11176, "Mahj" }, { 0x11180, 0x111DF, "Shrd" }, { 0x111E1, 0x111F4, "Sinh" }, { 0x11200, 0x11211, "Khoj" }, { 0x11213, 0x11241, "Khoj" }, { 0x11280, 0x11286, "Mult" }, { 0x1128A, 0x1128D, "Mult" }, { 0x1128F, 0x1129D, "Mult" }, { 0x1129F, 0x112A9, "Mult" }, { 0x112B0, 0x112EA, "Sind" }, { 0x112F0, 0x112F9, "Sind" }, { 0x11300, 0x11303, "Gran" }, { 0x11305, 0x1130C, "Gran" }, { 0x1130F, 0x11310, "Gran" }, { 0x11313, 0x11328, "Gran" }, { 0x1132A, 0x11330, "Gran" }, { 0x11332, 0x11333, "Gran" }, { 0x11335, 0x11339, "Gran" }, { 0x1133C, 0x11344, "Gran" }, { 0x11347, 0x11348, "Gran" }, { 0x1134B, 0x1134D, "Gran" }, { 0x1135D, 0x11363, "Gran" }, { 0x11366, 0x1136C, "Gran" }, { 0x11370, 0x11374, "Gran" }, { 0x11400, 0x1145B, "Newa" }, { 0x1145D, 0x11461, "Newa" }, { 0x11480, 0x114C7, "Tirh" }, { 0x114D0, 0x114D9, "Tirh" }, { 0x11580, 0x115B5, "Sidd" }, { 0x115B8, 0x115DD, "Sidd" }, { 0x11600, 0x11644, "Modi" }, { 0x11650, 0x11659, "Modi" }, { 0x11660, 0x1166C, "Mong" }, { 0x11680, 0x116B9, "Takr" }, { 0x116C0, 0x116C9, "Takr" }, { 0x11700, 0x1171A, "Ahom" }, { 0x1171D, 0x1172B, "Ahom" }, { 0x11730, 0x11746, "Ahom" }, { 0x11800, 0x1183B, "Dogr" }, { 0x118A0, 0x118F2, "Wara" }, { 0x11900, 0x11906, "Diak" }, { 0x1190C, 0x11913, "Diak" }, { 0x11915, 0x11916, "Diak" }, { 0x11918, 0x11935, "Diak" }, { 0x11937, 0x11938, "Diak" }, { 0x1193B, 0x11946, "Diak" }, { 0x11950, 0x11959, "Diak" }, { 0x119A0, 0x119A7, "Nand" }, { 0x119AA, 0x119D7, "Nand" }, { 0x119DA, 0x119E4, "Nand" }, { 0x11A00, 0x11A47, "Zanb" }, { 0x11A50, 0x11AA2, "Soyo" }, { 0x11AB0, 0x11ABF, "Cans" }, { 0x11AC0, 0x11AF8, "Pauc" }, { 0x11B00, 0x11B09, "Deva" }, { 0x11C00, 0x11C08, "Bhks" }, { 0x11C0A, 0x11C36, "Bhks" }, { 0x11C38, 0x11C45, "Bhks" }, { 0x11C50, 0x11C6C, "Bhks" }, { 0x11C70, 0x11C8F, "Marc" }, { 0x11C92, 0x11CA7, "Marc" }, { 0x11CA9, 0x11CB6, "Marc" }, { 0x11D00, 0x11D06, "Gonm" }, { 0x11D08, 0x11D09, "Gonm" }, { 0x11D0B, 0x11D36, "Gonm" }, { 0x11D3C, 0x11D3D, "Gonm" }, { 0x11D3F, 0x11D47, "Gonm" }, { 0x11D50, 0x11D59, "Gonm" }, { 0x11D60, 0x11D65, "Gong" }, { 0x11D67, 0x11D68, "Gong" }, { 0x11D6A, 0x11D8E, "Gong" }, { 0x11D90, 0x11D91, "Gong" }, { 0x11D93, 0x11D98, "Gong" }, { 0x11DA0, 0x11DA9, "Gong" }, { 0x11EE0, 0x11EF8, "Maka" }, { 0x11F00, 0x11F10, "Kawi" }, { 0x11F12, 0x11F3A, "Kawi" }, { 0x11F3E, 0x11F59, "Kawi" }, { 0x11FC0, 0x11FF1, "Taml" }, { 0x12000, 0x12399, "Xsux" }, { 0x12400, 0x1246E, "Xsux" }, { 0x12470, 0x12474, "Xsux" }, { 0x12480, 0x12543, "Xsux" }, { 0x12F90, 0x12FF2, "Cpmn" }, { 0x13000, 0x13455, "Egyp" }, { 0x14400, 0x14646, "Hluw" }, { 0x16800, 0x16A38, "Bamu" }, { 0x16A40, 0x16A5E, "Mroo" }, { 0x16A60, 0x16A69, "Mroo" }, { 0x16A6E, 0x16A6F, "Mroo" }, { 0x16A70, 0x16ABE, "Tnsa" }, { 0x16AC0, 0x16AC9, "Tnsa" }, { 0x16AD0, 0x16AED, "Bass" }, { 0x16AF0, 0x16AF5, "Bass" }, { 0x16B00, 0x16B45, "Hmng" }, { 0x16B50, 0x16B59, "Hmng" }, { 0x16B5B, 0x16B61, "Hmng" }, { 0x16B63, 0x16B77, "Hmng" }, { 0x16B7D, 0x16B8F, "Hmng" }, { 0x16E40, 0x16E9A, "Medf" }, { 0x16F00, 0x16F4A, "Plrd" }, { 0x16F4F, 0x16F87, "Plrd" }, { 0x16F8F, 0x16F9F, "Plrd" }, { 0x16FE2, 0x16FE3, "Hani" }, { 0x16FF0, 0x16FF1, "Hani" }, { 0x17000, 0x187F7, "Tang" }, { 0x18800, 0x18AFF, "Tang" }, { 0x18B00, 0x18CD5, "Kits" }, { 0x18D00, 0x18D08, "Tang" }, { 0x1AFF0, 0x1AFF3, "Kana" }, { 0x1AFF5, 0x1AFFB, "Kana" }, { 0x1AFFD, 0x1AFFE, "Kana" }, { 0x1B001, 0x1B11F, "Hira" }, { 0x1B120, 0x1B122, "Kana" }, { 0x1B150, 0x1B152, "Hira" }, { 0x1B164, 0x1B167, "Kana" }, { 0x1B170, 0x1B2FB, "Nshu" }, { 0x1BC00, 0x1BC6A, "Dupl" }, { 0x1BC70, 0x1BC7C, "Dupl" }, { 0x1BC80, 0x1BC88, "Dupl" }, { 0x1BC90, 0x1BC99, "Dupl" }, { 0x1BC9C, 0x1BC9F, "Dupl" }, { 0x1BCA0, 0x1BCA3, "Zyyy" }, { 0x1CF00, 0x1CF2D, "Zinh" }, { 0x1CF30, 0x1CF46, "Zinh" }, { 0x1CF50, 0x1CFC3, "Zyyy" }, { 0x1D000, 0x1D0F5, "Zyyy" }, { 0x1D100, 0x1D126, "Zyyy" }, { 0x1D129, 0x1D166, "Zyyy" }, { 0x1D167, 0x1D169, "Zinh" }, { 0x1D16A, 0x1D17A, "Zyyy" }, { 0x1D17B, 0x1D182, "Zinh" }, { 0x1D183, 0x1D184, "Zyyy" }, { 0x1D185, 0x1D18B, "Zinh" }, { 0x1D18C, 0x1D1A9, "Zyyy" }, { 0x1D1AA, 0x1D1AD, "Zinh" }, { 0x1D1AE, 0x1D1EA, "Zyyy" }, { 0x1D200, 0x1D245, "Grek" }, { 0x1D2C0, 0x1D2D3, "Zyyy" }, { 0x1D2E0, 0x1D2F3, "Zyyy" }, { 0x1D300, 0x1D356, "Zyyy" }, { 0x1D360, 0x1D378, "Zyyy" }, { 0x1D400, 0x1D454, "Zyyy" }, { 0x1D456, 0x1D49C, "Zyyy" }, { 0x1D49E, 0x1D49F, "Zyyy" }, { 0x1D4A5, 0x1D4A6, "Zyyy" }, { 0x1D4A9, 0x1D4AC, "Zyyy" }, { 0x1D4AE, 0x1D4B9, "Zyyy" }, { 0x1D4BD, 0x1D4C3, "Zyyy" }, { 0x1D4C5, 0x1D505, "Zyyy" }, { 0x1D507, 0x1D50A, "Zyyy" }, { 0x1D50D, 0x1D514, "Zyyy" }, { 0x1D516, 0x1D51C, "Zyyy" }, { 0x1D51E, 0x1D539, "Zyyy" }, { 0x1D53B, 0x1D53E, "Zyyy" }, { 0x1D540, 0x1D544, "Zyyy" }, { 0x1D54A, 0x1D550, "Zyyy" }, { 0x1D552, 0x1D6A5, "Zyyy" }, { 0x1D6A8, 0x1D7CB, "Zyyy" }, { 0x1D7CE, 0x1D7FF, "Zyyy" }, { 0x1D800, 0x1DA8B, "Sgnw" }, { 0x1DA9B, 0x1DA9F, "Sgnw" }, { 0x1DAA1, 0x1DAAF, "Sgnw" }, { 0x1DF00, 0x1DF1E, "Latn" }, { 0x1DF25, 0x1DF2A, "Latn" }, { 0x1E000, 0x1E006, "Glag" }, { 0x1E008, 0x1E018, "Glag" }, { 0x1E01B, 0x1E021, "Glag" }, { 0x1E023, 0x1E024, "Glag" }, { 0x1E026, 0x1E02A, "Glag" }, { 0x1E030, 0x1E06D, "Cyrl" }, { 0x1E100, 0x1E12C, "Hmnp" }, { 0x1E130, 0x1E13D, "Hmnp" }, { 0x1E140, 0x1E149, "Hmnp" }, { 0x1E14E, 0x1E14F, "Hmnp" }, { 0x1E290, 0x1E2AE, "Toto" }, { 0x1E2C0, 0x1E2F9, "Wcho" }, { 0x1E4D0, 0x1E4F9, "Nagm" }, { 0x1E7E0, 0x1E7E6, "Ethi" }, { 0x1E7E8, 0x1E7EB, "Ethi" }, { 0x1E7ED, 0x1E7EE, "Ethi" }, { 0x1E7F0, 0x1E7FE, "Ethi" }, { 0x1E800, 0x1E8C4, "Mend" }, { 0x1E8C7, 0x1E8D6, "Mend" }, { 0x1E900, 0x1E94B, "Adlm" }, { 0x1E950, 0x1E959, "Adlm" }, { 0x1E95E, 0x1E95F, "Adlm" }, { 0x1EC71, 0x1ECB4, "Zyyy" }, { 0x1ED01, 0x1ED3D, "Zyyy" }, { 0x1EE00, 0x1EE03, "Arab" }, { 0x1EE05, 0x1EE1F, "Arab" }, { 0x1EE21, 0x1EE22, "Arab" }, { 0x1EE29, 0x1EE32, "Arab" }, { 0x1EE34, 0x1EE37, "Arab" }, { 0x1EE4D, 0x1EE4F, "Arab" }, { 0x1EE51, 0x1EE52, "Arab" }, { 0x1EE61, 0x1EE62, "Arab" }, { 0x1EE67, 0x1EE6A, "Arab" }, { 0x1EE6C, 0x1EE72, "Arab" }, { 0x1EE74, 0x1EE77, "Arab" }, { 0x1EE79, 0x1EE7C, "Arab" }, { 0x1EE80, 0x1EE89, "Arab" }, { 0x1EE8B, 0x1EE9B, "Arab" }, { 0x1EEA1, 0x1EEA3, "Arab" }, { 0x1EEA5, 0x1EEA9, "Arab" }, { 0x1EEAB, 0x1EEBB, "Arab" }, { 0x1EEF0, 0x1EEF1, "Arab" }, { 0x1F000, 0x1F02B, "Zyyy" }, { 0x1F030, 0x1F093, "Zyyy" }, { 0x1F0A0, 0x1F0AE, "Zyyy" }, { 0x1F0B1, 0x1F0BF, "Zyyy" }, { 0x1F0C1, 0x1F0CF, "Zyyy" }, { 0x1F0D1, 0x1F0F5, "Zyyy" }, { 0x1F100, 0x1F1AD, "Zyyy" }, { 0x1F1E6, 0x1F1FF, "Zyyy" }, { 0x1F201, 0x1F202, "Zyyy" }, { 0x1F210, 0x1F23B, "Zyyy" }, { 0x1F240, 0x1F248, "Zyyy" }, { 0x1F250, 0x1F251, "Zyyy" }, { 0x1F260, 0x1F265, "Zyyy" }, { 0x1F300, 0x1F6D7, "Zyyy" }, { 0x1F6DC, 0x1F6EC, "Zyyy" }, { 0x1F6F0, 0x1F6FC, "Zyyy" }, { 0x1F700, 0x1F776, "Zyyy" }, { 0x1F77B, 0x1F7D9, "Zyyy" }, { 0x1F7E0, 0x1F7EB, "Zyyy" }, { 0x1F800, 0x1F80B, "Zyyy" }, { 0x1F810, 0x1F847, "Zyyy" }, { 0x1F850, 0x1F859, "Zyyy" }, { 0x1F860, 0x1F887, "Zyyy" }, { 0x1F890, 0x1F8AD, "Zyyy" }, { 0x1F8B0, 0x1F8B1, "Zyyy" }, { 0x1F900, 0x1FA53, "Zyyy" }, { 0x1FA60, 0x1FA6D, "Zyyy" }, { 0x1FA70, 0x1FA7C, "Zyyy" }, { 0x1FA80, 0x1FA88, "Zyyy" }, { 0x1FA90, 0x1FABD, "Zyyy" }, { 0x1FABF, 0x1FAC5, "Zyyy" }, { 0x1FACE, 0x1FADB, "Zyyy" }, { 0x1FAE0, 0x1FAE8, "Zyyy" }, { 0x1FAF0, 0x1FAF8, "Zyyy" }, { 0x1FB00, 0x1FB92, "Zyyy" }, { 0x1FB94, 0x1FBCA, "Zyyy" }, { 0x1FBF0, 0x1FBF9, "Zyyy" }, { 0x20000, 0x2A6DF, "Hani" }, { 0x2A700, 0x2B739, "Hani" }, { 0x2B740, 0x2B81D, "Hani" }, { 0x2B820, 0x2CEA1, "Hani" }, { 0x2CEB0, 0x2EBE0, "Hani" }, { 0x2EBF0, 0x2EE5D, "Hani" }, { 0x2F800, 0x2FA1D, "Hani" }, { 0x30000, 0x3134A, "Hani" }, { 0x31350, 0x323AF, "Hani" }, { 0xE0020, 0xE007F, "Zyyy" }, { 0xE0100, 0xE01EF, "Zinh" }, }, -- Scripts.txt gives full names; here we consider them aliases to save space. aliases = { Adlm = "Adlam", Aghb = "Caucasian Albanian", Ahom = "Ahom", Arab = "Arabic", Armi = "Imperial Aramaic", Armn = "Armenian", Avst = "Avestan", Bali = "Balinese", Bamu = "Bamum", Bass = "Bassa Vah", Batk = "Batak", Beng = "Bengali", Bhks = "Bhaiksuki", Bopo = "Bopomofo", Brah = "Brahmi", Brai = "Braille", Bugi = "Buginese", Buhd = "Buhid", Cakm = "Chakma", Cans = "Canadian Aboriginal", Cari = "Carian", Cham = "Cham", Cher = "Cherokee", Chrs = "Chorasmian", Copt = "Coptic", Cpmn = "Cypro Minoan", Cprt = "Cypriot", Cyrl = "Cyrillic", Deva = "Devanagari", Diak = "Dives Akuru", Dogr = "Dogra", Dsrt = "Deseret", Dupl = "Duployan", Egyp = "Egyptian Hieroglyphs", Elba = "Elbasan", Elym = "Elymaic", Ethi = "Ethiopic", Geor = "Georgian", Glag = "Glagolitic", Gong = "Gunjala Gondi", Gonm = "Masaram Gondi", Goth = "Gothic", Gran = "Grantha", Grek = "Greek", Gujr = "Gujarati", Guru = "Gurmukhi", Hang = "Hangul", Hani = "Han", Hano = "Hanunoo", Hatr = "Hatran", Hebr = "Hebrew", Hira = "Hiragana", Hluw = "Anatolian Hieroglyphs", Hmng = "Pahawh Hmong", Hmnp = "Nyiakeng Puachue Hmong", Hrkt = "Katakana Or Hiragana", Hung = "Old Hungarian", Ital = "Old Italic", Java = "Javanese", Kali = "Kayah Li", Kana = "Katakana", Kawi = "Kawi", Khar = "Kharoshthi", Khmr = "Khmer", Khoj = "Khojki", Kits = "Khitan Small Script", Knda = "Kannada", Kthi = "Kaithi", Lana = "Tai Tham", Laoo = "Lao", Latn = "Latin", Lepc = "Lepcha", Limb = "Limbu", Lina = "Linear A", Linb = "Linear B", Lisu = "Lisu", Lyci = "Lycian", Lydi = "Lydian", Mahj = "Mahajani", Maka = "Makasar", Mand = "Mandaic", Mani = "Manichaean", Marc = "Marchen", Medf = "Medefaidrin", Mend = "Mende Kikakui", Merc = "Meroitic Cursive", Mero = "Meroitic Hieroglyphs", Mlym = "Malayalam", Modi = "Modi", Mong = "Mongolian", Mroo = "Mro", Mtei = "Meetei Mayek", Mult = "Multani", Mymr = "Myanmar", Nagm = "Nag Mundari", Nand = "Nandinagari", Narb = "Old North Arabian", Nbat = "Nabataean", Newa = "Newa", Nkoo = "NKo", Nshu = "Nushu", Ogam = "Ogham", Olck = "Ol Chiki", Orkh = "Old Turkic", Orya = "Oriya", Osge = "Osage", Osma = "Osmanya", Ougr = "Old Uyghur", Palm = "Palmyrene", Pauc = "Pau Cin Hau", Perm = "Old Permic", Phag = "Phags Pa", Phli = "Inscriptional Pahlavi", Phlp = "Psalter Pahlavi", Phnx = "Phoenician", Plrd = "Miao", Prti = "Inscriptional Parthian", Rjng = "Rejang", Rohg = "Hanifi Rohingya", Runr = "Runic", Samr = "Samaritan", Sarb = "Old South Arabian", Saur = "Saurashtra", Sgnw = "SignWriting", Shaw = "Shavian", Shrd = "Sharada", Sidd = "Siddham", Sind = "Khudawadi", Sinh = "Sinhala", Sogd = "Sogdian", Sogo = "Old Sogdian", Sora = "Sora Sompeng", Soyo = "Soyombo", Sund = "Sundanese", Sylo = "Syloti Nagri", Syrc = "Syriac", Tagb = "Tagbanwa", Takr = "Takri", Tale = "Tai Le", Talu = "New Tai Lue", Taml = "Tamil", Tang = "Tangut", Tavt = "Tai Viet", Telu = "Telugu", Tfng = "Tifinagh", Tglg = "Tagalog", Thaa = "Thaana", Thai = "Thai", Tibt = "Tibetan", Tirh = "Tirhuta", Tnsa = "Tangsa", Toto = "Toto", Ugar = "Ugaritic", Vaii = "Vai", Vith = "Vithkuqi", Wara = "Warang Citi", Wcho = "Wancho", Xpeo = "Old Persian", Xsux = "Cuneiform", Yezi = "Yezidi", Yiii = "Yi", Zanb = "Zanabazar Square", Zinh = "Inherited", Zyyy = "Common", Zzzz = "Unknown", }, } -- Required for binary search function in [[Module:Language/scripts]]. -- Cannot get length of module loaded with mw.loadData. data.ranges.length = #data.ranges data.rtl = {} for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do -- [[Module:Lang/data]] has script codes in lowercase; -- this module has script codes with the first letter capitalized. data.rtl[script:gsub("^%a", string.upper)] = true end return data 6afbaa9e21efd3898f0ff056b5456c0cd5813400 Template:Parameter names example 10 65 127 2023-10-08T00:30:05Z wikipedia>Shkuru Afshar 0 wikitext text/x-wiki <includeonly>{{#invoke:Parameter names example|main}}</includeonly><noinclude> {{documentation}}<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 256a11b9ae7ac7e492b3d9de86ade1ffa96bffd1 Module:Navbar 828 36 69 2023-10-10T22:34:57Z wikipedia>Pppery 0 Per edit request on talk Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = 'Special:EditPage/' .. title.fullText, ['url'] = false }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = 'Special:PageHistory/' .. title.fullText, ['url'] = false }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 047f307758c878eb3e99ed1768cc40920a6ec5fa Module:String 828 16 29 2023-10-25T18:17:50Z wikipedia>Trappist the monk 0 Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The first index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 2ad0905c56ef4955950b75a8f00974fe82aed5e4 Module:Documentation/config 828 51 99 2023-10-28T01:25:16Z wikipedia>Pppery 0 Split [[Category:Templates sandboxes]] per CfD Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 56b6127664e31128dea1cecf2e392cf9313df6a3 Template:Plainlist/doc 10 234 579 2023-11-01T00:21:51Z wikipedia>Gkiyoshinishimoto 0 /* Redirects */ wikitext text/x-wiki {{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --> {{Cascade-protected template}} {{High-use}} {{Template shortcut|PL}} {{Uses TemplateStyles|Template:Plainlist/styles.css}} This template provides a [[Web Content Accessibility Guidelines|WCAG]]/ISO-standards-compliant accessible alternative to <code><nowiki><br /></nowiki></code> separated lists, per [[WP:UBLIST]] and [[WP:PLIST]] == Usage == {{tl|plainlist}} starts a plain (i.e. unbulleted) list, such as: {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with {{tag|br|s}}. Detailed reasons for using this template can be found at [[WP:UBLIST]]. This template can be used with or without {{tl|endplainlist}}. It is an alternative to {{tl|unbulleted list}}, which performs the same function in a more concise but less wiki-style manner. Note that {{tl|unbulleted list}} will work inside image captions, whereas {{tl|plainlist}} does not. == Examples == {{Markup |<nowiki> {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} </nowiki> | {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} }} === Alternative syntax === {{Markup |<nowiki> {{plainlist}} * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] {{endplainlist}} </nowiki> | {{plainlist}} * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] {{endplainlist}} }} == Parameters == {{Format TemplateData|JSON= { "params": { "1": { "label": "List content", "description": "If supplied, the list, as a normal bulleted list. (Every line should start with an asterisk. No blank lines between lines.) See template page for how this works otherwise.", "type": "content", "suggested": true }, "class": { "label": "CSS classes", "description": "Adds a CSS class to the containing div.", "type": "string", "default": "The class \"plainlist\" is always applied." }, "style": { "label": "Custom CSS", "description": "Adds CSS style options. Complex styles should not be used in articles (per [[WP:Deviations]]) but may be acceptable on user, project, and talk pages.", "type": "string", "example": "border:solid 1px silver; background:lightyellow" }, "indent": { "label": "Indent level", "description": "Indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.", "type": "number", "example": "2" } }, "description": "This template provides a WCAG/ISO-standards-compliant accessible alternative to &lt;br /&gt; separated lists, per [[WP:UBLIST]] and [[WP:PLIST]]. It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with &lt;br /&gt;. Detailed reasons for using this template can be found at WP:UBLIST." } }} === Controlling line-breaking === Template {{tlx|nbsp}} may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists, to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details. == Technical details == {{tl|Plainlist}} works by constructing a [[span and div|div]] with the [[Cascading Style Sheets|CSS]] class "plainlist" which has the styles listed in [[Template:Plainlist/styles.css]]. {| class="wikitable" ! Wikitext ! Expanded template ! HTML |- style="vertical-align:top;" | class="nowrap" | <pre> {{Plainlist| * Example 1 * Example 2 * Example 3 }} </pre> | class="nowrap" | {{nowiki2|tag=pre| {{Plainlist| * Example 1 * Example 2 * Example 3 }} }} | <syntaxhighlight lang="html"> <div class="plainlist"> <ul> <li>Example 1</li> <li>Example 2</li> <li>Example 3</li> </ul> </div> </syntaxhighlight> |} == Redirects == * {{Template link|Bulletless list}} * {{Template link|PL}} * {{Template link|Plain list}} * {{tl|Startplainlist}} == See also == * {{tl|unbulleted list}} – essentially the same but uses <code><nowiki>| ... | ... | ...</nowiki></code> instead of <code><nowiki>|* ... * ... * ...</nowiki></code> * {{tl|flatlist}} and {{tl|hlist}} (replacements for comma- or dash-separated lists) * {{tl|bulleted list}} * {{tl|indented plainlist}} * {{tl|ordered list}} * {{section link|Template:Infobox person#Inline lists}} for more information on creating lists within the Infobox family of templates, with examples in the following {{section link|Template:Infobox person#Examples|nopage=y}} {{navbox lists}} <includeonly>{{Sandbox other|| <!-- CATEGORIES HERE, THANKS --> [[Category:List formatting and function templates|Plainlist]] [[Category:Semantic markup templates]] [[Category:Typing-aid templates|Plainlist]] }}</includeonly> 31a29deecf8ad25736413a712c9818665e2d2a54 Module:Language/data/iana languages 828 95 263 2023-11-03T15:39:53Z wikipedia>Trappist the monk 0 update to 2023-10-16 data; Scribunto text/plain -- File-Date: 2023-10-16 local active = { ["aa"] = {"Afar"}, ["ab"] = {"Abkhazian"}, ["ae"] = {"Avestan"}, ["af"] = {"Afrikaans"}, ["ak"] = {"Akan"}, ["am"] = {"Amharic"}, ["an"] = {"Aragonese"}, ["ar"] = {"Arabic"}, ["as"] = {"Assamese"}, ["av"] = {"Avaric"}, ["ay"] = {"Aymara"}, ["az"] = {"Azerbaijani"}, ["ba"] = {"Bashkir"}, ["be"] = {"Belarusian"}, ["bg"] = {"Bulgarian"}, ["bh"] = {"Bihari languages"}, ["bi"] = {"Bislama"}, ["bm"] = {"Bambara"}, ["bn"] = {"Bengali", "Bangla"}, ["bo"] = {"Tibetan"}, ["br"] = {"Breton"}, ["bs"] = {"Bosnian"}, ["ca"] = {"Catalan", "Valencian"}, ["ce"] = {"Chechen"}, ["ch"] = {"Chamorro"}, ["co"] = {"Corsican"}, ["cr"] = {"Cree"}, ["cs"] = {"Czech"}, ["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"}, ["cv"] = {"Chuvash"}, ["cy"] = {"Welsh"}, ["da"] = {"Danish"}, ["de"] = {"German"}, ["dv"] = {"Dhivehi", "Divehi", "Maldivian"}, ["dz"] = {"Dzongkha"}, ["ee"] = {"Ewe"}, ["el"] = {"Modern Greek (1453-)"}, ["en"] = {"English"}, ["eo"] = {"Esperanto"}, ["es"] = {"Spanish", "Castilian"}, ["et"] = {"Estonian"}, ["eu"] = {"Basque"}, ["fa"] = {"Persian"}, ["ff"] = {"Fulah"}, ["fi"] = {"Finnish"}, ["fj"] = {"Fijian"}, ["fo"] = {"Faroese"}, ["fr"] = {"French"}, ["fy"] = {"Western Frisian"}, ["ga"] = {"Irish"}, ["gd"] = {"Scottish Gaelic", "Gaelic"}, ["gl"] = {"Galician"}, ["gn"] = {"Guarani"}, ["gu"] = {"Gujarati"}, ["gv"] = {"Manx"}, ["ha"] = {"Hausa"}, ["he"] = {"Hebrew"}, ["hi"] = {"Hindi"}, ["ho"] = {"Hiri Motu"}, ["hr"] = {"Croatian"}, ["ht"] = {"Haitian", "Haitian Creole"}, ["hu"] = {"Hungarian"}, ["hy"] = {"Armenian"}, ["hz"] = {"Herero"}, ["ia"] = {"Interlingua (International Auxiliary Language Association)"}, ["id"] = {"Indonesian"}, ["ie"] = {"Interlingue", "Occidental"}, ["ig"] = {"Igbo"}, ["ii"] = {"Sichuan Yi", "Nuosu"}, ["ik"] = {"Inupiaq"}, ["io"] = {"Ido"}, ["is"] = {"Icelandic"}, ["it"] = {"Italian"}, ["iu"] = {"Inuktitut"}, ["ja"] = {"Japanese"}, ["jv"] = {"Javanese"}, ["ka"] = {"Georgian"}, ["kg"] = {"Kongo"}, ["ki"] = {"Kikuyu", "Gikuyu"}, ["kj"] = {"Kuanyama", "Kwanyama"}, ["kk"] = {"Kazakh"}, ["kl"] = {"Kalaallisut", "Greenlandic"}, ["km"] = {"Khmer", "Central Khmer"}, ["kn"] = {"Kannada"}, ["ko"] = {"Korean"}, ["kr"] = {"Kanuri"}, ["ks"] = {"Kashmiri"}, ["ku"] = {"Kurdish"}, ["kv"] = {"Komi"}, ["kw"] = {"Cornish"}, ["ky"] = {"Kirghiz", "Kyrgyz"}, ["la"] = {"Latin"}, ["lb"] = {"Luxembourgish", "Letzeburgesch"}, ["lg"] = {"Ganda", "Luganda"}, ["li"] = {"Limburgan", "Limburger", "Limburgish"}, ["ln"] = {"Lingala"}, ["lo"] = {"Lao"}, ["lt"] = {"Lithuanian"}, ["lu"] = {"Luba-Katanga"}, ["lv"] = {"Latvian"}, ["mg"] = {"Malagasy"}, ["mh"] = {"Marshallese"}, ["mi"] = {"Maori"}, ["mk"] = {"Macedonian"}, ["ml"] = {"Malayalam"}, ["mn"] = {"Mongolian"}, ["mr"] = {"Marathi"}, ["ms"] = {"Malay (macrolanguage)"}, ["mt"] = {"Maltese"}, ["my"] = {"Burmese"}, ["na"] = {"Nauru"}, ["nb"] = {"Norwegian Bokmål"}, ["nd"] = {"North Ndebele"}, ["ne"] = {"Nepali (macrolanguage)"}, ["ng"] = {"Ndonga"}, ["nl"] = {"Dutch", "Flemish"}, ["nn"] = {"Norwegian Nynorsk"}, ["no"] = {"Norwegian"}, ["nr"] = {"South Ndebele"}, ["nv"] = {"Navajo", "Navaho"}, ["ny"] = {"Nyanja", "Chewa", "Chichewa"}, ["oc"] = {"Occitan (post 1500)"}, ["oj"] = {"Ojibwa"}, ["om"] = {"Oromo"}, ["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"}, ["os"] = {"Ossetian", "Ossetic"}, ["pa"] = {"Panjabi", "Punjabi"}, ["pi"] = {"Pali"}, ["pl"] = {"Polish"}, ["ps"] = {"Pushto", "Pashto"}, ["pt"] = {"Portuguese"}, ["qu"] = {"Quechua"}, ["rm"] = {"Romansh"}, ["rn"] = {"Rundi"}, ["ro"] = {"Romanian", "Moldavian", "Moldovan"}, ["ru"] = {"Russian"}, ["rw"] = {"Kinyarwanda"}, ["sa"] = {"Sanskrit"}, ["sc"] = {"Sardinian"}, ["sd"] = {"Sindhi"}, ["se"] = {"Northern Sami"}, ["sg"] = {"Sango"}, ["sh"] = {"Serbo-Croatian"}, ["si"] = {"Sinhala", "Sinhalese"}, ["sk"] = {"Slovak"}, ["sl"] = {"Slovenian"}, ["sm"] = {"Samoan"}, ["sn"] = {"Shona"}, ["so"] = {"Somali"}, ["sq"] = {"Albanian"}, ["sr"] = {"Serbian"}, ["ss"] = {"Swati"}, ["st"] = {"Southern Sotho"}, ["su"] = {"Sundanese"}, ["sv"] = {"Swedish"}, ["sw"] = {"Swahili (macrolanguage)"}, ["ta"] = {"Tamil"}, ["te"] = {"Telugu"}, ["tg"] = {"Tajik"}, ["th"] = {"Thai"}, ["ti"] = {"Tigrinya"}, ["tk"] = {"Turkmen"}, ["tl"] = {"Tagalog"}, ["tn"] = {"Tswana"}, ["to"] = {"Tonga (Tonga Islands)"}, ["tr"] = {"Turkish"}, ["ts"] = {"Tsonga"}, ["tt"] = {"Tatar"}, ["tw"] = {"Twi"}, ["ty"] = {"Tahitian"}, ["ug"] = {"Uighur", "Uyghur"}, ["uk"] = {"Ukrainian"}, ["ur"] = {"Urdu"}, ["uz"] = {"Uzbek"}, ["ve"] = {"Venda"}, ["vi"] = {"Vietnamese"}, ["vo"] = {"Volapük"}, ["wa"] = {"Walloon"}, ["wo"] = {"Wolof"}, ["xh"] = {"Xhosa"}, ["yi"] = {"Yiddish"}, ["yo"] = {"Yoruba"}, ["za"] = {"Zhuang", "Chuang"}, ["zh"] = {"Chinese"}, ["zu"] = {"Zulu"}, ["aaa"] = {"Ghotuo"}, ["aab"] = {"Alumu-Tesu"}, ["aac"] = {"Ari"}, ["aad"] = {"Amal"}, ["aae"] = {"Arbëreshë Albanian"}, ["aaf"] = {"Aranadan"}, ["aag"] = {"Ambrak"}, ["aah"] = {"Abu' Arapesh"}, ["aai"] = {"Arifama-Miniafia"}, ["aak"] = {"Ankave"}, ["aal"] = {"Afade"}, ["aan"] = {"Anambé"}, ["aao"] = {"Algerian Saharan Arabic"}, ["aap"] = {"Pará Arára"}, ["aaq"] = {"Eastern Abnaki"}, ["aas"] = {"Aasáx"}, ["aat"] = {"Arvanitika Albanian"}, ["aau"] = {"Abau"}, ["aav"] = {"Austro-Asiatic languages"}, ["aaw"] = {"Solong"}, ["aax"] = {"Mandobo Atas"}, ["aaz"] = {"Amarasi"}, ["aba"] = {"Abé"}, ["abb"] = {"Bankon"}, ["abc"] = {"Ambala Ayta"}, ["abd"] = {"Manide"}, ["abe"] = {"Western Abnaki"}, ["abf"] = {"Abai Sungai"}, ["abg"] = {"Abaga"}, ["abh"] = {"Tajiki Arabic"}, ["abi"] = {"Abidji"}, ["abj"] = {"Aka-Bea"}, ["abl"] = {"Lampung Nyo"}, ["abm"] = {"Abanyom"}, ["abn"] = {"Abua"}, ["abo"] = {"Abon"}, ["abp"] = {"Abellen Ayta"}, ["abq"] = {"Abaza"}, ["abr"] = {"Abron"}, ["abs"] = {"Ambonese Malay"}, ["abt"] = {"Ambulas"}, ["abu"] = {"Abure"}, ["abv"] = {"Baharna Arabic"}, ["abw"] = {"Pal"}, ["abx"] = {"Inabaknon"}, ["aby"] = {"Aneme Wake"}, ["abz"] = {"Abui"}, ["aca"] = {"Achagua"}, ["acb"] = {"Áncá"}, ["acd"] = {"Gikyode"}, ["ace"] = {"Achinese"}, ["acf"] = {"Saint Lucian Creole French"}, ["ach"] = {"Acoli"}, ["aci"] = {"Aka-Cari"}, ["ack"] = {"Aka-Kora"}, ["acl"] = {"Akar-Bale"}, ["acm"] = {"Mesopotamian Arabic"}, ["acn"] = {"Achang"}, ["acp"] = {"Eastern Acipa"}, ["acq"] = {"Ta'izzi-Adeni Arabic"}, ["acr"] = {"Achi"}, ["acs"] = {"Acroá"}, ["act"] = {"Achterhoeks"}, ["acu"] = {"Achuar-Shiwiar"}, ["acv"] = {"Achumawi"}, ["acw"] = {"Hijazi Arabic"}, ["acx"] = {"Omani Arabic"}, ["acy"] = {"Cypriot Arabic"}, ["acz"] = {"Acheron"}, ["ada"] = {"Adangme"}, ["adb"] = {"Atauran"}, ["add"] = {"Lidzonka", "Dzodinka"}, ["ade"] = {"Adele"}, ["adf"] = {"Dhofari Arabic"}, ["adg"] = {"Andegerebinha"}, ["adh"] = {"Adhola"}, ["adi"] = {"Adi"}, ["adj"] = {"Adioukrou"}, ["adl"] = {"Galo"}, ["adn"] = {"Adang"}, ["ado"] = {"Abu"}, ["adq"] = {"Adangbe"}, ["adr"] = {"Adonara"}, ["ads"] = {"Adamorobe Sign Language"}, ["adt"] = {"Adnyamathanha"}, ["adu"] = {"Aduge"}, ["adw"] = {"Amundava"}, ["adx"] = {"Amdo Tibetan"}, ["ady"] = {"Adyghe", "Adygei"}, ["adz"] = {"Adzera"}, ["aea"] = {"Areba"}, ["aeb"] = {"Tunisian Arabic"}, ["aec"] = {"Saidi Arabic"}, ["aed"] = {"Argentine Sign Language"}, ["aee"] = {"Northeast Pashai", "Northeast Pashayi"}, ["aek"] = {"Haeke"}, ["ael"] = {"Ambele"}, ["aem"] = {"Arem"}, ["aen"] = {"Armenian Sign Language"}, ["aeq"] = {"Aer"}, ["aer"] = {"Eastern Arrernte"}, ["aes"] = {"Alsea"}, ["aeu"] = {"Akeu"}, ["aew"] = {"Ambakich"}, ["aey"] = {"Amele"}, ["aez"] = {"Aeka"}, ["afa"] = {"Afro-Asiatic languages"}, ["afb"] = {"Gulf Arabic"}, ["afd"] = {"Andai"}, ["afe"] = {"Putukwam"}, ["afg"] = {"Afghan Sign Language"}, ["afh"] = {"Afrihili"}, ["afi"] = {"Akrukay", "Chini"}, ["afk"] = {"Nanubae"}, ["afn"] = {"Defaka"}, ["afo"] = {"Eloyi"}, ["afp"] = {"Tapei"}, ["afs"] = {"Afro-Seminole Creole"}, ["aft"] = {"Afitti"}, ["afu"] = {"Awutu"}, ["afz"] = {"Obokuitai"}, ["aga"] = {"Aguano"}, ["agb"] = {"Legbo"}, ["agc"] = {"Agatu"}, ["agd"] = {"Agarabi"}, ["age"] = {"Angal"}, ["agf"] = {"Arguni"}, ["agg"] = {"Angor"}, ["agh"] = {"Ngelima"}, ["agi"] = {"Agariya"}, ["agj"] = {"Argobba"}, ["agk"] = {"Isarog Agta"}, ["agl"] = {"Fembe"}, ["agm"] = {"Angaataha"}, ["agn"] = {"Agutaynen"}, ["ago"] = {"Tainae"}, ["agq"] = {"Aghem"}, ["agr"] = {"Aguaruna"}, ["ags"] = {"Esimbi"}, ["agt"] = {"Central Cagayan Agta"}, ["agu"] = {"Aguacateco"}, ["agv"] = {"Remontado Dumagat"}, ["agw"] = {"Kahua"}, ["agx"] = {"Aghul"}, ["agy"] = {"Southern Alta"}, ["agz"] = {"Mt. Iriga Agta"}, ["aha"] = {"Ahanta"}, ["ahb"] = {"Axamb"}, ["ahg"] = {"Qimant"}, ["ahh"] = {"Aghu"}, ["ahi"] = {"Tiagbamrin Aizi"}, ["ahk"] = {"Akha"}, ["ahl"] = {"Igo"}, ["ahm"] = {"Mobumrin Aizi"}, ["ahn"] = {"Àhàn"}, ["aho"] = {"Ahom"}, ["ahp"] = {"Aproumu Aizi"}, ["ahr"] = {"Ahirani"}, ["ahs"] = {"Ashe"}, ["aht"] = {"Ahtena"}, ["aia"] = {"Arosi"}, ["aib"] = {"Ainu (China)"}, ["aic"] = {"Ainbai"}, ["aid"] = {"Alngith"}, ["aie"] = {"Amara"}, ["aif"] = {"Agi"}, ["aig"] = {"Antigua and Barbuda Creole English"}, ["aih"] = {"Ai-Cham"}, ["aii"] = {"Assyrian Neo-Aramaic"}, ["aij"] = {"Lishanid Noshan"}, ["aik"] = {"Ake"}, ["ail"] = {"Aimele"}, ["aim"] = {"Aimol"}, ["ain"] = {"Ainu (Japan)"}, ["aio"] = {"Aiton"}, ["aip"] = {"Burumakok"}, ["aiq"] = {"Aimaq"}, ["air"] = {"Airoran"}, ["ait"] = {"Arikem"}, ["aiw"] = {"Aari"}, ["aix"] = {"Aighon"}, ["aiy"] = {"Ali"}, ["aja"] = {"Aja (South Sudan)"}, ["ajg"] = {"Aja (Benin)"}, ["aji"] = {"Ajië"}, ["ajn"] = {"Andajin"}, ["ajs"] = {"Algerian Jewish Sign Language"}, ["aju"] = {"Judeo-Moroccan Arabic"}, ["ajw"] = {"Ajawa"}, ["ajz"] = {"Amri Karbi"}, ["akb"] = {"Batak Angkola"}, ["akc"] = {"Mpur"}, ["akd"] = {"Ukpet-Ehom"}, ["ake"] = {"Akawaio"}, ["akf"] = {"Akpa"}, ["akg"] = {"Anakalangu"}, ["akh"] = {"Angal Heneng"}, ["aki"] = {"Aiome"}, ["akj"] = {"Aka-Jeru"}, ["akk"] = {"Akkadian"}, ["akl"] = {"Aklanon"}, ["akm"] = {"Aka-Bo"}, ["ako"] = {"Akurio"}, ["akp"] = {"Siwu"}, ["akq"] = {"Ak"}, ["akr"] = {"Araki"}, ["aks"] = {"Akaselem"}, ["akt"] = {"Akolet"}, ["aku"] = {"Akum"}, ["akv"] = {"Akhvakh"}, ["akw"] = {"Akwa"}, ["akx"] = {"Aka-Kede"}, ["aky"] = {"Aka-Kol"}, ["akz"] = {"Alabama"}, ["ala"] = {"Alago"}, ["alc"] = {"Qawasqar"}, ["ald"] = {"Alladian"}, ["ale"] = {"Aleut"}, ["alf"] = {"Alege"}, ["alg"] = {"Algonquian languages"}, ["alh"] = {"Alawa"}, ["ali"] = {"Amaimon"}, ["alj"] = {"Alangan"}, ["alk"] = {"Alak"}, ["all"] = {"Allar"}, ["alm"] = {"Amblong"}, ["aln"] = {"Gheg Albanian"}, ["alo"] = {"Larike-Wakasihu"}, ["alp"] = {"Alune"}, ["alq"] = {"Algonquin"}, ["alr"] = {"Alutor"}, ["als"] = {"Tosk Albanian"}, ["alt"] = {"Southern Altai"}, ["alu"] = {"'Are'are"}, ["alv"] = {"Atlantic-Congo languages"}, ["alw"] = {"Alaba-K’abeena", "Wanbasana"}, ["alx"] = {"Amol"}, ["aly"] = {"Alyawarr"}, ["alz"] = {"Alur"}, ["ama"] = {"Amanayé"}, ["amb"] = {"Ambo"}, ["amc"] = {"Amahuaca"}, ["ame"] = {"Yanesha'"}, ["amf"] = {"Hamer-Banna"}, ["amg"] = {"Amurdak"}, ["ami"] = {"Amis"}, ["amj"] = {"Amdang"}, ["amk"] = {"Ambai"}, ["aml"] = {"War-Jaintia"}, ["amm"] = {"Ama (Papua New Guinea)"}, ["amn"] = {"Amanab"}, ["amo"] = {"Amo"}, ["amp"] = {"Alamblak"}, ["amq"] = {"Amahai"}, ["amr"] = {"Amarakaeri"}, ["ams"] = {"Southern Amami-Oshima"}, ["amt"] = {"Amto"}, ["amu"] = {"Guerrero Amuzgo"}, ["amv"] = {"Ambelau"}, ["amw"] = {"Western Neo-Aramaic"}, ["amx"] = {"Anmatyerre"}, ["amy"] = {"Ami"}, ["amz"] = {"Atampaya"}, ["ana"] = {"Andaqui"}, ["anb"] = {"Andoa"}, ["anc"] = {"Ngas"}, ["and"] = {"Ansus"}, ["ane"] = {"Xârâcùù"}, ["anf"] = {"Animere"}, ["ang"] = {"Old English (ca. 450-1100)"}, ["anh"] = {"Nend"}, ["ani"] = {"Andi"}, ["anj"] = {"Anor"}, ["ank"] = {"Goemai"}, ["anl"] = {"Anu-Hkongso Chin"}, ["anm"] = {"Anal"}, ["ann"] = {"Obolo"}, ["ano"] = {"Andoque"}, ["anp"] = {"Angika"}, ["anq"] = {"Jarawa (India)"}, ["anr"] = {"Andh"}, ["ans"] = {"Anserma"}, ["ant"] = {"Antakarinya", "Antikarinya"}, ["anu"] = {"Anuak"}, ["anv"] = {"Denya"}, ["anw"] = {"Anaang"}, ["anx"] = {"Andra-Hus"}, ["any"] = {"Anyin"}, ["anz"] = {"Anem"}, ["aoa"] = {"Angolar"}, ["aob"] = {"Abom"}, ["aoc"] = {"Pemon"}, ["aod"] = {"Andarum"}, ["aoe"] = {"Angal Enen"}, ["aof"] = {"Bragat"}, ["aog"] = {"Angoram"}, ["aoi"] = {"Anindilyakwa"}, ["aoj"] = {"Mufian"}, ["aok"] = {"Arhö"}, ["aol"] = {"Alor"}, ["aom"] = {"Ömie"}, ["aon"] = {"Bumbita Arapesh"}, ["aor"] = {"Aore"}, ["aos"] = {"Taikat"}, ["aot"] = {"Atong (India)", "A'tong"}, ["aou"] = {"A'ou"}, ["aox"] = {"Atorada"}, ["aoz"] = {"Uab Meto"}, ["apa"] = {"Apache languages"}, ["apb"] = {"Sa'a"}, ["apc"] = {"Levantine Arabic"}, ["apd"] = {"Sudanese Arabic"}, ["ape"] = {"Bukiyip"}, ["apf"] = {"Pahanan Agta"}, ["apg"] = {"Ampanang"}, ["aph"] = {"Athpariya"}, ["api"] = {"Apiaká"}, ["apj"] = {"Jicarilla Apache"}, ["apk"] = {"Kiowa Apache"}, ["apl"] = {"Lipan Apache"}, ["apm"] = {"Mescalero-Chiricahua Apache"}, ["apn"] = {"Apinayé"}, ["apo"] = {"Ambul"}, ["app"] = {"Apma"}, ["apq"] = {"A-Pucikwar"}, ["apr"] = {"Arop-Lokep"}, ["aps"] = {"Arop-Sissano"}, ["apt"] = {"Apatani"}, ["apu"] = {"Apurinã"}, ["apv"] = {"Alapmunte"}, ["apw"] = {"Western Apache"}, ["apx"] = {"Aputai"}, ["apy"] = {"Apalaí"}, ["apz"] = {"Safeyoka"}, ["aqa"] = {"Alacalufan languages"}, ["aqc"] = {"Archi"}, ["aqd"] = {"Ampari Dogon"}, ["aqg"] = {"Arigidi"}, ["aqk"] = {"Aninka"}, ["aql"] = {"Algic languages"}, ["aqm"] = {"Atohwaim"}, ["aqn"] = {"Northern Alta"}, ["aqp"] = {"Atakapa"}, ["aqr"] = {"Arhâ"}, ["aqt"] = {"Angaité"}, ["aqz"] = {"Akuntsu"}, ["arb"] = {"Standard Arabic"}, ["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"}, ["ard"] = {"Arabana"}, ["are"] = {"Western Arrarnta"}, ["arh"] = {"Arhuaco"}, ["ari"] = {"Arikara"}, ["arj"] = {"Arapaso"}, ["ark"] = {"Arikapú"}, ["arl"] = {"Arabela"}, ["arn"] = {"Mapudungun", "Mapuche"}, ["aro"] = {"Araona"}, ["arp"] = {"Arapaho"}, ["arq"] = {"Algerian Arabic"}, ["arr"] = {"Karo (Brazil)"}, ["ars"] = {"Najdi Arabic"}, ["art"] = {"Artificial languages"}, ["aru"] = {"Aruá (Amazonas State)", "Arawá"}, ["arv"] = {"Arbore"}, ["arw"] = {"Arawak"}, ["arx"] = {"Aruá (Rodonia State)"}, ["ary"] = {"Moroccan Arabic"}, ["arz"] = {"Egyptian Arabic"}, ["asa"] = {"Asu (Tanzania)"}, ["asb"] = {"Assiniboine"}, ["asc"] = {"Casuarina Coast Asmat"}, ["ase"] = {"American Sign Language"}, ["asf"] = {"Auslan", "Australian Sign Language"}, ["asg"] = {"Cishingini"}, ["ash"] = {"Abishira"}, ["asi"] = {"Buruwai"}, ["asj"] = {"Sari"}, ["ask"] = {"Ashkun"}, ["asl"] = {"Asilulu"}, ["asn"] = {"Xingú Asuriní"}, ["aso"] = {"Dano"}, ["asp"] = {"Algerian Sign Language"}, ["asq"] = {"Austrian Sign Language"}, ["asr"] = {"Asuri"}, ["ass"] = {"Ipulo"}, ["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"}, ["asu"] = {"Tocantins Asurini"}, ["asv"] = {"Asoa"}, ["asw"] = {"Australian Aborigines Sign Language"}, ["asx"] = {"Muratayak"}, ["asy"] = {"Yaosakor Asmat"}, ["asz"] = {"As"}, ["ata"] = {"Pele-Ata"}, ["atb"] = {"Zaiwa"}, ["atc"] = {"Atsahuaca"}, ["atd"] = {"Ata Manobo"}, ["ate"] = {"Atemble"}, ["atg"] = {"Ivbie North-Okpela-Arhe"}, ["ath"] = {"Athapascan languages"}, ["ati"] = {"Attié"}, ["atj"] = {"Atikamekw"}, ["atk"] = {"Ati"}, ["atl"] = {"Mt. Iraya Agta"}, ["atm"] = {"Ata"}, ["atn"] = {"Ashtiani"}, ["ato"] = {"Atong (Cameroon)"}, ["atp"] = {"Pudtol Atta"}, ["atq"] = {"Aralle-Tabulahan"}, ["atr"] = {"Waimiri-Atroari"}, ["ats"] = {"Gros Ventre"}, ["att"] = {"Pamplona Atta"}, ["atu"] = {"Reel"}, ["atv"] = {"Northern Altai"}, ["atw"] = {"Atsugewi"}, ["atx"] = {"Arutani"}, ["aty"] = {"Aneityum"}, ["atz"] = {"Arta"}, ["aua"] = {"Asumboa"}, ["aub"] = {"Alugu"}, ["auc"] = {"Waorani"}, ["aud"] = {"Anuta"}, ["auf"] = {"Arauan languages"}, ["aug"] = {"Aguna"}, ["auh"] = {"Aushi"}, ["aui"] = {"Anuki"}, ["auj"] = {"Awjilah"}, ["auk"] = {"Heyo"}, ["aul"] = {"Aulua"}, ["aum"] = {"Asu (Nigeria)"}, ["aun"] = {"Molmo One"}, ["auo"] = {"Auyokawa"}, ["aup"] = {"Makayam"}, ["auq"] = {"Anus", "Korur"}, ["aur"] = {"Aruek"}, ["aus"] = {"Australian languages"}, ["aut"] = {"Austral"}, ["auu"] = {"Auye"}, ["auw"] = {"Awyi"}, ["aux"] = {"Aurá"}, ["auy"] = {"Awiyaana"}, ["auz"] = {"Uzbeki Arabic"}, ["avb"] = {"Avau"}, ["avd"] = {"Alviri-Vidari"}, ["avi"] = {"Avikam"}, ["avk"] = {"Kotava"}, ["avl"] = {"Eastern Egyptian Bedawi Arabic"}, ["avm"] = {"Angkamuthi"}, ["avn"] = {"Avatime"}, ["avo"] = {"Agavotaguerra"}, ["avs"] = {"Aushiri"}, ["avt"] = {"Au"}, ["avu"] = {"Avokaya"}, ["avv"] = {"Avá-Canoeiro"}, ["awa"] = {"Awadhi"}, ["awb"] = {"Awa (Papua New Guinea)"}, ["awc"] = {"Cicipu"}, ["awd"] = {"Arawakan languages"}, ["awe"] = {"Awetí"}, ["awg"] = {"Anguthimri"}, ["awh"] = {"Awbono"}, ["awi"] = {"Aekyom"}, ["awk"] = {"Awabakal"}, ["awm"] = {"Arawum"}, ["awn"] = {"Awngi"}, ["awo"] = {"Awak"}, ["awr"] = {"Awera"}, ["aws"] = {"South Awyu"}, ["awt"] = {"Araweté"}, ["awu"] = {"Central Awyu"}, ["awv"] = {"Jair Awyu"}, ["aww"] = {"Awun"}, ["awx"] = {"Awara"}, ["awy"] = {"Edera Awyu"}, ["axb"] = {"Abipon"}, ["axe"] = {"Ayerrerenge"}, ["axg"] = {"Mato Grosso Arára"}, ["axk"] = {"Yaka (Central African Republic)"}, ["axl"] = {"Lower Southern Aranda"}, ["axm"] = {"Middle Armenian"}, ["axx"] = {"Xârâgurè"}, ["aya"] = {"Awar"}, ["ayb"] = {"Ayizo Gbe"}, ["ayc"] = {"Southern Aymara"}, ["ayd"] = {"Ayabadhu"}, ["aye"] = {"Ayere"}, ["ayg"] = {"Ginyanga"}, ["ayh"] = {"Hadrami Arabic"}, ["ayi"] = {"Leyigha"}, ["ayk"] = {"Akuku"}, ["ayl"] = {"Libyan Arabic"}, ["ayn"] = {"Sanaani Arabic"}, ["ayo"] = {"Ayoreo"}, ["ayp"] = {"North Mesopotamian Arabic"}, ["ayq"] = {"Ayi (Papua New Guinea)"}, ["ayr"] = {"Central Aymara"}, ["ays"] = {"Sorsogon Ayta"}, ["ayt"] = {"Magbukun Ayta"}, ["ayu"] = {"Ayu"}, ["ayz"] = {"Mai Brat"}, ["aza"] = {"Azha"}, ["azb"] = {"South Azerbaijani"}, ["azc"] = {"Uto-Aztecan languages"}, ["azd"] = {"Eastern Durango Nahuatl"}, ["azg"] = {"San Pedro Amuzgos Amuzgo"}, ["azj"] = {"North Azerbaijani"}, ["azm"] = {"Ipalapa Amuzgo"}, ["azn"] = {"Western Durango Nahuatl"}, ["azo"] = {"Awing"}, ["azt"] = {"Faire Atta"}, ["azz"] = {"Highland Puebla Nahuatl"}, ["baa"] = {"Babatana"}, ["bab"] = {"Bainouk-Gunyuño"}, ["bac"] = {"Badui"}, ["bad"] = {"Banda languages"}, ["bae"] = {"Baré"}, ["baf"] = {"Nubaca"}, ["bag"] = {"Tuki"}, ["bah"] = {"Bahamas Creole English"}, ["bai"] = {"Bamileke languages"}, ["baj"] = {"Barakai"}, ["bal"] = {"Baluchi"}, ["ban"] = {"Balinese"}, ["bao"] = {"Waimaha"}, ["bap"] = {"Bantawa"}, ["bar"] = {"Bavarian"}, ["bas"] = {"Basa (Cameroon)"}, ["bat"] = {"Baltic languages"}, ["bau"] = {"Bada (Nigeria)"}, ["bav"] = {"Vengo"}, ["baw"] = {"Bambili-Bambui"}, ["bax"] = {"Bamun"}, ["bay"] = {"Batuley"}, ["bba"] = {"Baatonum"}, ["bbb"] = {"Barai"}, ["bbc"] = {"Batak Toba"}, ["bbd"] = {"Bau"}, ["bbe"] = {"Bangba"}, ["bbf"] = {"Baibai"}, ["bbg"] = {"Barama"}, ["bbh"] = {"Bugan"}, ["bbi"] = {"Barombi"}, ["bbj"] = {"Ghomálá'"}, ["bbk"] = {"Babanki"}, ["bbl"] = {"Bats"}, ["bbm"] = {"Babango"}, ["bbn"] = {"Uneapa"}, ["bbo"] = {"Northern Bobo Madaré", "Konabéré"}, ["bbp"] = {"West Central Banda"}, ["bbq"] = {"Bamali"}, ["bbr"] = {"Girawa"}, ["bbs"] = {"Bakpinka"}, ["bbt"] = {"Mburku"}, ["bbu"] = {"Kulung (Nigeria)"}, ["bbv"] = {"Karnai"}, ["bbw"] = {"Baba"}, ["bbx"] = {"Bubia"}, ["bby"] = {"Befang"}, ["bca"] = {"Central Bai"}, ["bcb"] = {"Bainouk-Samik"}, ["bcc"] = {"Southern Balochi"}, ["bcd"] = {"North Babar"}, ["bce"] = {"Bamenyam"}, ["bcf"] = {"Bamu"}, ["bcg"] = {"Baga Pokur"}, ["bch"] = {"Bariai"}, ["bci"] = {"Baoulé"}, ["bcj"] = {"Bardi"}, ["bck"] = {"Bunuba"}, ["bcl"] = {"Central Bikol"}, ["bcm"] = {"Bannoni"}, ["bcn"] = {"Bali (Nigeria)"}, ["bco"] = {"Kaluli"}, ["bcp"] = {"Bali (Democratic Republic of Congo)"}, ["bcq"] = {"Bench"}, ["bcr"] = {"Babine"}, ["bcs"] = {"Kohumono"}, ["bct"] = {"Bendi"}, ["bcu"] = {"Awad Bing"}, ["bcv"] = {"Shoo-Minda-Nye"}, ["bcw"] = {"Bana"}, ["bcy"] = {"Bacama"}, ["bcz"] = {"Bainouk-Gunyaamolo"}, ["bda"] = {"Bayot"}, ["bdb"] = {"Basap"}, ["bdc"] = {"Emberá-Baudó"}, ["bdd"] = {"Bunama"}, ["bde"] = {"Bade"}, ["bdf"] = {"Biage"}, ["bdg"] = {"Bonggi"}, ["bdh"] = {"Baka (South Sudan)"}, ["bdi"] = {"Burun"}, ["bdj"] = {"Bai (South Sudan)", "Bai"}, ["bdk"] = {"Budukh"}, ["bdl"] = {"Indonesian Bajau"}, ["bdm"] = {"Buduma"}, ["bdn"] = {"Baldemu"}, ["bdo"] = {"Morom"}, ["bdp"] = {"Bende"}, ["bdq"] = {"Bahnar"}, ["bdr"] = {"West Coast Bajau"}, ["bds"] = {"Burunge"}, ["bdt"] = {"Bokoto"}, ["bdu"] = {"Oroko"}, ["bdv"] = {"Bodo Parja"}, ["bdw"] = {"Baham"}, ["bdx"] = {"Budong-Budong"}, ["bdy"] = {"Bandjalang"}, ["bdz"] = {"Badeshi"}, ["bea"] = {"Beaver"}, ["beb"] = {"Bebele"}, ["bec"] = {"Iceve-Maci"}, ["bed"] = {"Bedoanas"}, ["bee"] = {"Byangsi"}, ["bef"] = {"Benabena"}, ["beg"] = {"Belait"}, ["beh"] = {"Biali"}, ["bei"] = {"Bekati'"}, ["bej"] = {"Beja", "Bedawiyet"}, ["bek"] = {"Bebeli"}, ["bem"] = {"Bemba (Zambia)"}, ["beo"] = {"Beami"}, ["bep"] = {"Besoa"}, ["beq"] = {"Beembe"}, ["ber"] = {"Berber languages"}, ["bes"] = {"Besme"}, ["bet"] = {"Guiberoua Béte"}, ["beu"] = {"Blagar"}, ["bev"] = {"Daloa Bété"}, ["bew"] = {"Betawi"}, ["bex"] = {"Jur Modo"}, ["bey"] = {"Beli (Papua New Guinea)"}, ["bez"] = {"Bena (Tanzania)"}, ["bfa"] = {"Bari"}, ["bfb"] = {"Pauri Bareli"}, ["bfc"] = {"Panyi Bai", "Northern Bai"}, ["bfd"] = {"Bafut"}, ["bfe"] = {"Betaf", "Tena"}, ["bff"] = {"Bofi"}, ["bfg"] = {"Busang Kayan"}, ["bfh"] = {"Blafe"}, ["bfi"] = {"British Sign Language"}, ["bfj"] = {"Bafanji"}, ["bfk"] = {"Ban Khor Sign Language"}, ["bfl"] = {"Banda-Ndélé"}, ["bfm"] = {"Mmen"}, ["bfn"] = {"Bunak"}, ["bfo"] = {"Malba Birifor"}, ["bfp"] = {"Beba"}, ["bfq"] = {"Badaga"}, ["bfr"] = {"Bazigar"}, ["bfs"] = {"Southern Bai"}, ["bft"] = {"Balti"}, ["bfu"] = {"Gahri"}, ["bfw"] = {"Bondo"}, ["bfx"] = {"Bantayanon"}, ["bfy"] = {"Bagheli"}, ["bfz"] = {"Mahasu Pahari"}, ["bga"] = {"Gwamhi-Wuri"}, ["bgb"] = {"Bobongko"}, ["bgc"] = {"Haryanvi"}, ["bgd"] = {"Rathwi Bareli"}, ["bge"] = {"Bauria"}, ["bgf"] = {"Bangandu"}, ["bgg"] = {"Bugun"}, ["bgi"] = {"Giangan"}, ["bgj"] = {"Bangolan"}, ["bgk"] = {"Bit", "Buxinhua"}, ["bgl"] = {"Bo (Laos)"}, ["bgn"] = {"Western Balochi"}, ["bgo"] = {"Baga Koga"}, ["bgp"] = {"Eastern Balochi"}, ["bgq"] = {"Bagri"}, ["bgr"] = {"Bawm Chin"}, ["bgs"] = {"Tagabawa"}, ["bgt"] = {"Bughotu"}, ["bgu"] = {"Mbongno"}, ["bgv"] = {"Warkay-Bipim"}, ["bgw"] = {"Bhatri"}, ["bgx"] = {"Balkan Gagauz Turkish"}, ["bgy"] = {"Benggoi"}, ["bgz"] = {"Banggai"}, ["bha"] = {"Bharia"}, ["bhb"] = {"Bhili"}, ["bhc"] = {"Biga"}, ["bhd"] = {"Bhadrawahi"}, ["bhe"] = {"Bhaya"}, ["bhf"] = {"Odiai"}, ["bhg"] = {"Binandere"}, ["bhh"] = {"Bukharic"}, ["bhi"] = {"Bhilali"}, ["bhj"] = {"Bahing"}, ["bhl"] = {"Bimin"}, ["bhm"] = {"Bathari"}, ["bhn"] = {"Bohtan Neo-Aramaic"}, ["bho"] = {"Bhojpuri"}, ["bhp"] = {"Bima"}, ["bhq"] = {"Tukang Besi South"}, ["bhr"] = {"Bara Malagasy"}, ["bhs"] = {"Buwal"}, ["bht"] = {"Bhattiyali"}, ["bhu"] = {"Bhunjia"}, ["bhv"] = {"Bahau"}, ["bhw"] = {"Biak"}, ["bhx"] = {"Bhalay"}, ["bhy"] = {"Bhele"}, ["bhz"] = {"Bada (Indonesia)"}, ["bia"] = {"Badimaya"}, ["bib"] = {"Bissa", "Bisa"}, ["bid"] = {"Bidiyo"}, ["bie"] = {"Bepour"}, ["bif"] = {"Biafada"}, ["big"] = {"Biangai"}, ["bik"] = {"Bikol"}, ["bil"] = {"Bile"}, ["bim"] = {"Bimoba"}, ["bin"] = {"Bini", "Edo"}, ["bio"] = {"Nai"}, ["bip"] = {"Bila"}, ["biq"] = {"Bipi"}, ["bir"] = {"Bisorio"}, ["bit"] = {"Berinomo"}, ["biu"] = {"Biete"}, ["biv"] = {"Southern Birifor"}, ["biw"] = {"Kol (Cameroon)"}, ["bix"] = {"Bijori"}, ["biy"] = {"Birhor"}, ["biz"] = {"Baloi"}, ["bja"] = {"Budza"}, ["bjb"] = {"Banggarla"}, ["bjc"] = {"Bariji"}, ["bje"] = {"Biao-Jiao Mien"}, ["bjf"] = {"Barzani Jewish Neo-Aramaic"}, ["bjg"] = {"Bidyogo"}, ["bjh"] = {"Bahinemo"}, ["bji"] = {"Burji"}, ["bjj"] = {"Kanauji"}, ["bjk"] = {"Barok"}, ["bjl"] = {"Bulu (Papua New Guinea)"}, ["bjm"] = {"Bajelani"}, ["bjn"] = {"Banjar"}, ["bjo"] = {"Mid-Southern Banda"}, ["bjp"] = {"Fanamaket"}, ["bjr"] = {"Binumarien"}, ["bjs"] = {"Bajan"}, ["bjt"] = {"Balanta-Ganja"}, ["bju"] = {"Busuu"}, ["bjv"] = {"Bedjond"}, ["bjw"] = {"Bakwé"}, ["bjx"] = {"Banao Itneg"}, ["bjy"] = {"Bayali"}, ["bjz"] = {"Baruga"}, ["bka"] = {"Kyak"}, ["bkc"] = {"Baka (Cameroon)"}, ["bkd"] = {"Binukid", "Talaandig"}, ["bkf"] = {"Beeke"}, ["bkg"] = {"Buraka"}, ["bkh"] = {"Bakoko"}, ["bki"] = {"Baki"}, ["bkj"] = {"Pande"}, ["bkk"] = {"Brokskat"}, ["bkl"] = {"Berik"}, ["bkm"] = {"Kom (Cameroon)"}, ["bkn"] = {"Bukitan"}, ["bko"] = {"Kwa'"}, ["bkp"] = {"Boko (Democratic Republic of Congo)"}, ["bkq"] = {"Bakairí"}, ["bkr"] = {"Bakumpai"}, ["bks"] = {"Northern Sorsoganon"}, ["bkt"] = {"Boloki"}, ["bku"] = {"Buhid"}, ["bkv"] = {"Bekwarra"}, ["bkw"] = {"Bekwel"}, ["bkx"] = {"Baikeno"}, ["bky"] = {"Bokyi"}, ["bkz"] = {"Bungku"}, ["bla"] = {"Siksika"}, ["blb"] = {"Bilua"}, ["blc"] = {"Bella Coola"}, ["bld"] = {"Bolango"}, ["ble"] = {"Balanta-Kentohe"}, ["blf"] = {"Buol"}, ["blh"] = {"Kuwaa"}, ["bli"] = {"Bolia"}, ["blj"] = {"Bolongan"}, ["blk"] = {"Pa'o Karen", "Pa'O"}, ["bll"] = {"Biloxi"}, ["blm"] = {"Beli (South Sudan)"}, ["bln"] = {"Southern Catanduanes Bikol"}, ["blo"] = {"Anii"}, ["blp"] = {"Blablanga"}, ["blq"] = {"Baluan-Pam"}, ["blr"] = {"Blang"}, ["bls"] = {"Balaesang"}, ["blt"] = {"Tai Dam"}, ["blv"] = {"Kibala", "Bolo"}, ["blw"] = {"Balangao"}, ["blx"] = {"Mag-Indi Ayta"}, ["bly"] = {"Notre"}, ["blz"] = {"Balantak"}, ["bma"] = {"Lame"}, ["bmb"] = {"Bembe"}, ["bmc"] = {"Biem"}, ["bmd"] = {"Baga Manduri"}, ["bme"] = {"Limassa"}, ["bmf"] = {"Bom-Kim"}, ["bmg"] = {"Bamwe"}, ["bmh"] = {"Kein"}, ["bmi"] = {"Bagirmi"}, ["bmj"] = {"Bote-Majhi"}, ["bmk"] = {"Ghayavi"}, ["bml"] = {"Bomboli"}, ["bmm"] = {"Northern Betsimisaraka Malagasy"}, ["bmn"] = {"Bina (Papua New Guinea)"}, ["bmo"] = {"Bambalang"}, ["bmp"] = {"Bulgebi"}, ["bmq"] = {"Bomu"}, ["bmr"] = {"Muinane"}, ["bms"] = {"Bilma Kanuri"}, ["bmt"] = {"Biao Mon"}, ["bmu"] = {"Somba-Siawari"}, ["bmv"] = {"Bum"}, ["bmw"] = {"Bomwali"}, ["bmx"] = {"Baimak"}, ["bmz"] = {"Baramu"}, ["bna"] = {"Bonerate"}, ["bnb"] = {"Bookan"}, ["bnc"] = {"Bontok"}, ["bnd"] = {"Banda (Indonesia)"}, ["bne"] = {"Bintauna"}, ["bnf"] = {"Masiwang"}, ["bng"] = {"Benga"}, ["bni"] = {"Bangi"}, ["bnj"] = {"Eastern Tawbuid"}, ["bnk"] = {"Bierebo"}, ["bnl"] = {"Boon"}, ["bnm"] = {"Batanga"}, ["bnn"] = {"Bunun"}, ["bno"] = {"Bantoanon"}, ["bnp"] = {"Bola"}, ["bnq"] = {"Bantik"}, ["bnr"] = {"Butmas-Tur"}, ["bns"] = {"Bundeli"}, ["bnt"] = {"Bantu languages"}, ["bnu"] = {"Bentong"}, ["bnv"] = {"Bonerif", "Beneraf", "Edwas"}, ["bnw"] = {"Bisis"}, ["bnx"] = {"Bangubangu"}, ["bny"] = {"Bintulu"}, ["bnz"] = {"Beezen"}, ["boa"] = {"Bora"}, ["bob"] = {"Aweer"}, ["boe"] = {"Mundabli"}, ["bof"] = {"Bolon"}, ["bog"] = {"Bamako Sign Language"}, ["boh"] = {"Boma"}, ["boi"] = {"Barbareño"}, ["boj"] = {"Anjam"}, ["bok"] = {"Bonjo"}, ["bol"] = {"Bole"}, ["bom"] = {"Berom"}, ["bon"] = {"Bine"}, ["boo"] = {"Tiemacèwè Bozo"}, ["bop"] = {"Bonkiman"}, ["boq"] = {"Bogaya"}, ["bor"] = {"Borôro"}, ["bot"] = {"Bongo"}, ["bou"] = {"Bondei"}, ["bov"] = {"Tuwuli"}, ["bow"] = {"Rema"}, ["box"] = {"Buamu"}, ["boy"] = {"Bodo (Central African Republic)"}, ["boz"] = {"Tiéyaxo Bozo"}, ["bpa"] = {"Daakaka"}, ["bpc"] = {"Mbuk"}, ["bpd"] = {"Banda-Banda"}, ["bpe"] = {"Bauni"}, ["bpg"] = {"Bonggo"}, ["bph"] = {"Botlikh"}, ["bpi"] = {"Bagupi"}, ["bpj"] = {"Binji"}, ["bpk"] = {"Orowe", "'Ôrôê"}, ["bpl"] = {"Broome Pearling Lugger Pidgin"}, ["bpm"] = {"Biyom"}, ["bpn"] = {"Dzao Min"}, ["bpo"] = {"Anasi"}, ["bpp"] = {"Kaure"}, ["bpq"] = {"Banda Malay"}, ["bpr"] = {"Koronadal Blaan"}, ["bps"] = {"Sarangani Blaan"}, ["bpt"] = {"Barrow Point"}, ["bpu"] = {"Bongu"}, ["bpv"] = {"Bian Marind"}, ["bpw"] = {"Bo (Papua New Guinea)"}, ["bpx"] = {"Palya Bareli"}, ["bpy"] = {"Bishnupriya"}, ["bpz"] = {"Bilba"}, ["bqa"] = {"Tchumbuli"}, ["bqb"] = {"Bagusa"}, ["bqc"] = {"Boko (Benin)", "Boo"}, ["bqd"] = {"Bung"}, ["bqf"] = {"Baga Kaloum"}, ["bqg"] = {"Bago-Kusuntu"}, ["bqh"] = {"Baima"}, ["bqi"] = {"Bakhtiari"}, ["bqj"] = {"Bandial"}, ["bqk"] = {"Banda-Mbrès"}, ["bql"] = {"Bilakura"}, ["bqm"] = {"Wumboko"}, ["bqn"] = {"Bulgarian Sign Language"}, ["bqo"] = {"Balo"}, ["bqp"] = {"Busa"}, ["bqq"] = {"Biritai"}, ["bqr"] = {"Burusu"}, ["bqs"] = {"Bosngun"}, ["bqt"] = {"Bamukumbit"}, ["bqu"] = {"Boguru"}, ["bqv"] = {"Koro Wachi", "Begbere-Ejar"}, ["bqw"] = {"Buru (Nigeria)"}, ["bqx"] = {"Baangi"}, ["bqy"] = {"Bengkala Sign Language"}, ["bqz"] = {"Bakaka"}, ["bra"] = {"Braj"}, ["brb"] = {"Brao", "Lave"}, ["brc"] = {"Berbice Creole Dutch"}, ["brd"] = {"Baraamu"}, ["brf"] = {"Bira"}, ["brg"] = {"Baure"}, ["brh"] = {"Brahui"}, ["bri"] = {"Mokpwe"}, ["brj"] = {"Bieria"}, ["brk"] = {"Birked"}, ["brl"] = {"Birwa"}, ["brm"] = {"Barambu"}, ["brn"] = {"Boruca"}, ["bro"] = {"Brokkat"}, ["brp"] = {"Barapasi"}, ["brq"] = {"Breri"}, ["brr"] = {"Birao"}, ["brs"] = {"Baras"}, ["brt"] = {"Bitare"}, ["bru"] = {"Eastern Bru"}, ["brv"] = {"Western Bru"}, ["brw"] = {"Bellari"}, ["brx"] = {"Bodo (India)"}, ["bry"] = {"Burui"}, ["brz"] = {"Bilbil"}, ["bsa"] = {"Abinomn"}, ["bsb"] = {"Brunei Bisaya"}, ["bsc"] = {"Bassari", "Oniyan"}, ["bse"] = {"Wushi"}, ["bsf"] = {"Bauchi"}, ["bsg"] = {"Bashkardi"}, ["bsh"] = {"Kati"}, ["bsi"] = {"Bassossi"}, ["bsj"] = {"Bangwinji"}, ["bsk"] = {"Burushaski"}, ["bsl"] = {"Basa-Gumna"}, ["bsm"] = {"Busami"}, ["bsn"] = {"Barasana-Eduria"}, ["bso"] = {"Buso"}, ["bsp"] = {"Baga Sitemu"}, ["bsq"] = {"Bassa"}, ["bsr"] = {"Bassa-Kontagora"}, ["bss"] = {"Akoose"}, ["bst"] = {"Basketo"}, ["bsu"] = {"Bahonsuai"}, ["bsv"] = {"Baga Sobané"}, ["bsw"] = {"Baiso"}, ["bsx"] = {"Yangkam"}, ["bsy"] = {"Sabah Bisaya"}, ["bta"] = {"Bata"}, ["btc"] = {"Bati (Cameroon)"}, ["btd"] = {"Batak Dairi"}, ["bte"] = {"Gamo-Ningi"}, ["btf"] = {"Birgit"}, ["btg"] = {"Gagnoa Bété"}, ["bth"] = {"Biatah Bidayuh"}, ["bti"] = {"Burate"}, ["btj"] = {"Bacanese Malay"}, ["btk"] = {"Batak languages"}, ["btm"] = {"Batak Mandailing"}, ["btn"] = {"Ratagnon"}, ["bto"] = {"Rinconada Bikol"}, ["btp"] = {"Budibud"}, ["btq"] = {"Batek"}, ["btr"] = {"Baetora"}, ["bts"] = {"Batak Simalungun"}, ["btt"] = {"Bete-Bendi"}, ["btu"] = {"Batu"}, ["btv"] = {"Bateri"}, ["btw"] = {"Butuanon"}, ["btx"] = {"Batak Karo"}, ["bty"] = {"Bobot"}, ["btz"] = {"Batak Alas-Kluet"}, ["bua"] = {"Buriat"}, ["bub"] = {"Bua"}, ["buc"] = {"Bushi"}, ["bud"] = {"Ntcham"}, ["bue"] = {"Beothuk"}, ["buf"] = {"Bushoong"}, ["bug"] = {"Buginese"}, ["buh"] = {"Younuo Bunu"}, ["bui"] = {"Bongili"}, ["buj"] = {"Basa-Gurmana"}, ["buk"] = {"Bugawac"}, ["bum"] = {"Bulu (Cameroon)"}, ["bun"] = {"Sherbro"}, ["buo"] = {"Terei"}, ["bup"] = {"Busoa"}, ["buq"] = {"Brem"}, ["bus"] = {"Bokobaru"}, ["but"] = {"Bungain"}, ["buu"] = {"Budu"}, ["buv"] = {"Bun"}, ["buw"] = {"Bubi"}, ["bux"] = {"Boghom"}, ["buy"] = {"Bullom So"}, ["buz"] = {"Bukwen"}, ["bva"] = {"Barein"}, ["bvb"] = {"Bube"}, ["bvc"] = {"Baelelea"}, ["bvd"] = {"Baeggu"}, ["bve"] = {"Berau Malay"}, ["bvf"] = {"Boor"}, ["bvg"] = {"Bonkeng"}, ["bvh"] = {"Bure"}, ["bvi"] = {"Belanda Viri"}, ["bvj"] = {"Baan"}, ["bvk"] = {"Bukat"}, ["bvl"] = {"Bolivian Sign Language"}, ["bvm"] = {"Bamunka"}, ["bvn"] = {"Buna"}, ["bvo"] = {"Bolgo"}, ["bvp"] = {"Bumang"}, ["bvq"] = {"Birri"}, ["bvr"] = {"Burarra"}, ["bvt"] = {"Bati (Indonesia)"}, ["bvu"] = {"Bukit Malay"}, ["bvv"] = {"Baniva"}, ["bvw"] = {"Boga"}, ["bvx"] = {"Dibole"}, ["bvy"] = {"Baybayanon"}, ["bvz"] = {"Bauzi"}, ["bwa"] = {"Bwatoo"}, ["bwb"] = {"Namosi-Naitasiri-Serua"}, ["bwc"] = {"Bwile"}, ["bwd"] = {"Bwaidoka"}, ["bwe"] = {"Bwe Karen"}, ["bwf"] = {"Boselewa"}, ["bwg"] = {"Barwe"}, ["bwh"] = {"Bishuo"}, ["bwi"] = {"Baniwa"}, ["bwj"] = {"Láá Láá Bwamu"}, ["bwk"] = {"Bauwaki"}, ["bwl"] = {"Bwela"}, ["bwm"] = {"Biwat"}, ["bwn"] = {"Wunai Bunu"}, ["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"}, ["bwp"] = {"Mandobo Bawah"}, ["bwq"] = {"Southern Bobo Madaré"}, ["bwr"] = {"Bura-Pabir"}, ["bws"] = {"Bomboma"}, ["bwt"] = {"Bafaw-Balong"}, ["bwu"] = {"Buli (Ghana)"}, ["bww"] = {"Bwa"}, ["bwx"] = {"Bu-Nao Bunu"}, ["bwy"] = {"Cwi Bwamu"}, ["bwz"] = {"Bwisi"}, ["bxa"] = {"Tairaha"}, ["bxb"] = {"Belanda Bor"}, ["bxc"] = {"Molengue"}, ["bxd"] = {"Pela"}, ["bxe"] = {"Birale"}, ["bxf"] = {"Bilur", "Minigir"}, ["bxg"] = {"Bangala"}, ["bxh"] = {"Buhutu"}, ["bxi"] = {"Pirlatapa"}, ["bxj"] = {"Bayungu"}, ["bxk"] = {"Bukusu", "Lubukusu"}, ["bxl"] = {"Jalkunan"}, ["bxm"] = {"Mongolia Buriat"}, ["bxn"] = {"Burduna"}, ["bxo"] = {"Barikanchi"}, ["bxp"] = {"Bebil"}, ["bxq"] = {"Beele"}, ["bxr"] = {"Russia Buriat"}, ["bxs"] = {"Busam"}, ["bxu"] = {"China Buriat"}, ["bxv"] = {"Berakou"}, ["bxw"] = {"Bankagooma"}, ["bxz"] = {"Binahari"}, ["bya"] = {"Batak"}, ["byb"] = {"Bikya"}, ["byc"] = {"Ubaghara"}, ["byd"] = {"Benyadu'"}, ["bye"] = {"Pouye"}, ["byf"] = {"Bete"}, ["byg"] = {"Baygo"}, ["byh"] = {"Bhujel"}, ["byi"] = {"Buyu"}, ["byj"] = {"Bina (Nigeria)"}, ["byk"] = {"Biao"}, ["byl"] = {"Bayono"}, ["bym"] = {"Bidjara"}, ["byn"] = {"Bilin", "Blin"}, ["byo"] = {"Biyo"}, ["byp"] = {"Bumaji"}, ["byq"] = {"Basay"}, ["byr"] = {"Baruya", "Yipma"}, ["bys"] = {"Burak"}, ["byt"] = {"Berti"}, ["byv"] = {"Medumba"}, ["byw"] = {"Belhariya"}, ["byx"] = {"Qaqet"}, ["byz"] = {"Banaro"}, ["bza"] = {"Bandi"}, ["bzb"] = {"Andio"}, ["bzc"] = {"Southern Betsimisaraka Malagasy"}, ["bzd"] = {"Bribri"}, ["bze"] = {"Jenaama Bozo"}, ["bzf"] = {"Boikin"}, ["bzg"] = {"Babuza"}, ["bzh"] = {"Mapos Buang"}, ["bzi"] = {"Bisu"}, ["bzj"] = {"Belize Kriol English"}, ["bzk"] = {"Nicaragua Creole English"}, ["bzl"] = {"Boano (Sulawesi)"}, ["bzm"] = {"Bolondo"}, ["bzn"] = {"Boano (Maluku)"}, ["bzo"] = {"Bozaba"}, ["bzp"] = {"Kemberano"}, ["bzq"] = {"Buli (Indonesia)"}, ["bzr"] = {"Biri"}, ["bzs"] = {"Brazilian Sign Language"}, ["bzt"] = {"Brithenig"}, ["bzu"] = {"Burmeso"}, ["bzv"] = {"Naami"}, ["bzw"] = {"Basa (Nigeria)"}, ["bzx"] = {"Kɛlɛngaxo Bozo"}, ["bzy"] = {"Obanliku"}, ["bzz"] = {"Evant"}, ["caa"] = {"Chortí"}, ["cab"] = {"Garifuna"}, ["cac"] = {"Chuj"}, ["cad"] = {"Caddo"}, ["cae"] = {"Lehar", "Laalaa"}, ["caf"] = {"Southern Carrier"}, ["cag"] = {"Nivaclé"}, ["cah"] = {"Cahuarano"}, ["cai"] = {"Central American Indian languages"}, ["caj"] = {"Chané"}, ["cak"] = {"Kaqchikel", "Cakchiquel"}, ["cal"] = {"Carolinian"}, ["cam"] = {"Cemuhî"}, ["can"] = {"Chambri"}, ["cao"] = {"Chácobo"}, ["cap"] = {"Chipaya"}, ["caq"] = {"Car Nicobarese"}, ["car"] = {"Galibi Carib"}, ["cas"] = {"Tsimané"}, ["cau"] = {"Caucasian languages"}, ["cav"] = {"Cavineña"}, ["caw"] = {"Callawalla"}, ["cax"] = {"Chiquitano"}, ["cay"] = {"Cayuga"}, ["caz"] = {"Canichana"}, ["cba"] = {"Chibchan languages"}, ["cbb"] = {"Cabiyarí"}, ["cbc"] = {"Carapana"}, ["cbd"] = {"Carijona"}, ["cbg"] = {"Chimila"}, ["cbi"] = {"Chachi"}, ["cbj"] = {"Ede Cabe"}, ["cbk"] = {"Chavacano"}, ["cbl"] = {"Bualkhaw Chin"}, ["cbn"] = {"Nyahkur"}, ["cbo"] = {"Izora"}, ["cbq"] = {"Tsucuba", "Cuba"}, ["cbr"] = {"Cashibo-Cacataibo"}, ["cbs"] = {"Cashinahua"}, ["cbt"] = {"Chayahuita"}, ["cbu"] = {"Candoshi-Shapra"}, ["cbv"] = {"Cacua"}, ["cbw"] = {"Kinabalian"}, ["cby"] = {"Carabayo"}, ["ccc"] = {"Chamicuro"}, ["ccd"] = {"Cafundo Creole"}, ["cce"] = {"Chopi"}, ["ccg"] = {"Samba Daka"}, ["cch"] = {"Atsam"}, ["ccj"] = {"Kasanga"}, ["ccl"] = {"Cutchi-Swahili"}, ["ccm"] = {"Malaccan Creole Malay"}, ["ccn"] = {"North Caucasian languages"}, ["cco"] = {"Comaltepec Chinantec"}, ["ccp"] = {"Chakma"}, ["ccr"] = {"Cacaopera"}, ["ccs"] = {"South Caucasian languages"}, ["cda"] = {"Choni"}, ["cdc"] = {"Chadic languages"}, ["cdd"] = {"Caddoan languages"}, ["cde"] = {"Chenchu"}, ["cdf"] = {"Chiru"}, ["cdh"] = {"Chambeali"}, ["cdi"] = {"Chodri"}, ["cdj"] = {"Churahi"}, ["cdm"] = {"Chepang"}, ["cdn"] = {"Chaudangsi"}, ["cdo"] = {"Min Dong Chinese"}, ["cdr"] = {"Cinda-Regi-Tiyal"}, ["cds"] = {"Chadian Sign Language"}, ["cdy"] = {"Chadong"}, ["cdz"] = {"Koda"}, ["cea"] = {"Lower Chehalis"}, ["ceb"] = {"Cebuano"}, ["ceg"] = {"Chamacoco"}, ["cek"] = {"Eastern Khumi Chin"}, ["cel"] = {"Celtic languages"}, ["cen"] = {"Cen"}, ["cet"] = {"Centúúm"}, ["cey"] = {"Ekai Chin"}, ["cfa"] = {"Dijim-Bwilim"}, ["cfd"] = {"Cara"}, ["cfg"] = {"Como Karim"}, ["cfm"] = {"Falam Chin"}, ["cga"] = {"Changriwa"}, ["cgc"] = {"Kagayanen"}, ["cgg"] = {"Chiga"}, ["cgk"] = {"Chocangacakha"}, ["chb"] = {"Chibcha"}, ["chc"] = {"Catawba"}, ["chd"] = {"Highland Oaxaca Chontal"}, ["chf"] = {"Tabasco Chontal"}, ["chg"] = {"Chagatai"}, ["chh"] = {"Chinook"}, ["chj"] = {"Ojitlán Chinantec"}, ["chk"] = {"Chuukese"}, ["chl"] = {"Cahuilla"}, ["chm"] = {"Mari (Russia)"}, ["chn"] = {"Chinook jargon"}, ["cho"] = {"Choctaw"}, ["chp"] = {"Chipewyan", "Dene Suline"}, ["chq"] = {"Quiotepec Chinantec"}, ["chr"] = {"Cherokee"}, ["cht"] = {"Cholón"}, ["chw"] = {"Chuwabu"}, ["chx"] = {"Chantyal"}, ["chy"] = {"Cheyenne"}, ["chz"] = {"Ozumacín Chinantec"}, ["cia"] = {"Cia-Cia"}, ["cib"] = {"Ci Gbe"}, ["cic"] = {"Chickasaw"}, ["cid"] = {"Chimariko"}, ["cie"] = {"Cineni"}, ["cih"] = {"Chinali"}, ["cik"] = {"Chitkuli Kinnauri"}, ["cim"] = {"Cimbrian"}, ["cin"] = {"Cinta Larga"}, ["cip"] = {"Chiapanec"}, ["cir"] = {"Tiri", "Haméa", "Méa"}, ["ciw"] = {"Chippewa"}, ["ciy"] = {"Chaima"}, ["cja"] = {"Western Cham"}, ["cje"] = {"Chru"}, ["cjh"] = {"Upper Chehalis"}, ["cji"] = {"Chamalal"}, ["cjk"] = {"Chokwe"}, ["cjm"] = {"Eastern Cham"}, ["cjn"] = {"Chenapian"}, ["cjo"] = {"Ashéninka Pajonal"}, ["cjp"] = {"Cabécar"}, ["cjs"] = {"Shor"}, ["cjv"] = {"Chuave"}, ["cjy"] = {"Jinyu Chinese"}, ["ckb"] = {"Central Kurdish"}, ["ckh"] = {"Chak"}, ["ckl"] = {"Cibak"}, ["ckm"] = {"Chakavian"}, ["ckn"] = {"Kaang Chin"}, ["cko"] = {"Anufo"}, ["ckq"] = {"Kajakse"}, ["ckr"] = {"Kairak"}, ["cks"] = {"Tayo"}, ["ckt"] = {"Chukot"}, ["cku"] = {"Koasati"}, ["ckv"] = {"Kavalan"}, ["ckx"] = {"Caka"}, ["cky"] = {"Cakfem-Mushere"}, ["ckz"] = {"Cakchiquel-Quiché Mixed Language"}, ["cla"] = {"Ron"}, ["clc"] = {"Chilcotin"}, ["cld"] = {"Chaldean Neo-Aramaic"}, ["cle"] = {"Lealao Chinantec"}, ["clh"] = {"Chilisso"}, ["cli"] = {"Chakali"}, ["clj"] = {"Laitu Chin"}, ["clk"] = {"Idu-Mishmi"}, ["cll"] = {"Chala"}, ["clm"] = {"Clallam"}, ["clo"] = {"Lowland Oaxaca Chontal"}, ["clt"] = {"Lautu Chin"}, ["clu"] = {"Caluyanun"}, ["clw"] = {"Chulym"}, ["cly"] = {"Eastern Highland Chatino"}, ["cma"] = {"Maa"}, ["cmc"] = {"Chamic languages"}, ["cme"] = {"Cerma"}, ["cmg"] = {"Classical Mongolian"}, ["cmi"] = {"Emberá-Chamí"}, ["cml"] = {"Campalagian"}, ["cmm"] = {"Michigamea"}, ["cmn"] = {"Mandarin Chinese"}, ["cmo"] = {"Central Mnong"}, ["cmr"] = {"Mro-Khimi Chin"}, ["cms"] = {"Messapic"}, ["cmt"] = {"Camtho"}, ["cna"] = {"Changthang"}, ["cnb"] = {"Chinbon Chin"}, ["cnc"] = {"Côông"}, ["cng"] = {"Northern Qiang"}, ["cnh"] = {"Hakha Chin", "Haka Chin"}, ["cni"] = {"Asháninka"}, ["cnk"] = {"Khumi Chin"}, ["cnl"] = {"Lalana Chinantec"}, ["cno"] = {"Con"}, ["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"}, ["cnq"] = {"Chung"}, ["cnr"] = {"Montenegrin"}, ["cns"] = {"Central Asmat"}, ["cnt"] = {"Tepetotutla Chinantec"}, ["cnu"] = {"Chenoua"}, ["cnw"] = {"Ngawn Chin"}, ["cnx"] = {"Middle Cornish"}, ["coa"] = {"Cocos Islands Malay"}, ["cob"] = {"Chicomuceltec"}, ["coc"] = {"Cocopa"}, ["cod"] = {"Cocama-Cocamilla"}, ["coe"] = {"Koreguaje"}, ["cof"] = {"Colorado"}, ["cog"] = {"Chong"}, ["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"}, ["coj"] = {"Cochimi"}, ["cok"] = {"Santa Teresa Cora"}, ["col"] = {"Columbia-Wenatchi"}, ["com"] = {"Comanche"}, ["con"] = {"Cofán"}, ["coo"] = {"Comox"}, ["cop"] = {"Coptic"}, ["coq"] = {"Coquille"}, ["cot"] = {"Caquinte"}, ["cou"] = {"Wamey"}, ["cov"] = {"Cao Miao"}, ["cow"] = {"Cowlitz"}, ["cox"] = {"Nanti"}, ["coz"] = {"Chochotec"}, ["cpa"] = {"Palantla Chinantec"}, ["cpb"] = {"Ucayali-Yurúa Ashéninka"}, ["cpc"] = {"Ajyíninka Apurucayali"}, ["cpe"] = {"English-based creoles and pidgins"}, ["cpf"] = {"French-based creoles and pidgins"}, ["cpg"] = {"Cappadocian Greek"}, ["cpi"] = {"Chinese Pidgin English"}, ["cpn"] = {"Cherepon"}, ["cpo"] = {"Kpeego"}, ["cpp"] = {"Portuguese-based creoles and pidgins"}, ["cps"] = {"Capiznon"}, ["cpu"] = {"Pichis Ashéninka"}, ["cpx"] = {"Pu-Xian Chinese"}, ["cpy"] = {"South Ucayali Ashéninka"}, ["cqd"] = {"Chuanqiandian Cluster Miao"}, ["cra"] = {"Chara"}, ["crb"] = {"Island Carib"}, ["crc"] = {"Lonwolwol"}, ["crd"] = {"Coeur d'Alene"}, ["crf"] = {"Caramanta"}, ["crg"] = {"Michif"}, ["crh"] = {"Crimean Tatar", "Crimean Turkish"}, ["cri"] = {"Sãotomense"}, ["crj"] = {"Southern East Cree"}, ["crk"] = {"Plains Cree"}, ["crl"] = {"Northern East Cree"}, ["crm"] = {"Moose Cree"}, ["crn"] = {"El Nayar Cora"}, ["cro"] = {"Crow"}, ["crp"] = {"Creoles and pidgins"}, ["crq"] = {"Iyo'wujwa Chorote"}, ["crr"] = {"Carolina Algonquian"}, ["crs"] = {"Seselwa Creole French"}, ["crt"] = {"Iyojwa'ja Chorote"}, ["crv"] = {"Chaura"}, ["crw"] = {"Chrau"}, ["crx"] = {"Carrier"}, ["cry"] = {"Cori"}, ["crz"] = {"Cruzeño"}, ["csa"] = {"Chiltepec Chinantec"}, ["csb"] = {"Kashubian"}, ["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"}, ["csd"] = {"Chiangmai Sign Language"}, ["cse"] = {"Czech Sign Language"}, ["csf"] = {"Cuba Sign Language"}, ["csg"] = {"Chilean Sign Language"}, ["csh"] = {"Asho Chin"}, ["csi"] = {"Coast Miwok"}, ["csj"] = {"Songlai Chin"}, ["csk"] = {"Jola-Kasa"}, ["csl"] = {"Chinese Sign Language"}, ["csm"] = {"Central Sierra Miwok"}, ["csn"] = {"Colombian Sign Language"}, ["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"}, ["csp"] = {"Southern Ping Chinese", "Southern Pinghua"}, ["csq"] = {"Croatia Sign Language"}, ["csr"] = {"Costa Rican Sign Language"}, ["css"] = {"Southern Ohlone"}, ["cst"] = {"Northern Ohlone"}, ["csu"] = {"Central Sudanic languages"}, ["csv"] = {"Sumtu Chin"}, ["csw"] = {"Swampy Cree"}, ["csx"] = {"Cambodian Sign Language"}, ["csy"] = {"Siyin Chin"}, ["csz"] = {"Coos"}, ["cta"] = {"Tataltepec Chatino"}, ["ctc"] = {"Chetco"}, ["ctd"] = {"Tedim Chin"}, ["cte"] = {"Tepinapa Chinantec"}, ["ctg"] = {"Chittagonian"}, ["cth"] = {"Thaiphum Chin"}, ["ctl"] = {"Tlacoatzintepec Chinantec"}, ["ctm"] = {"Chitimacha"}, ["ctn"] = {"Chhintange"}, ["cto"] = {"Emberá-Catío"}, ["ctp"] = {"Western Highland Chatino"}, ["cts"] = {"Northern Catanduanes Bikol"}, ["ctt"] = {"Wayanad Chetti"}, ["ctu"] = {"Chol"}, ["cty"] = {"Moundadan Chetty"}, ["ctz"] = {"Zacatepec Chatino"}, ["cua"] = {"Cua"}, ["cub"] = {"Cubeo"}, ["cuc"] = {"Usila Chinantec"}, ["cuh"] = {"Chuka", "Gichuka"}, ["cui"] = {"Cuiba"}, ["cuj"] = {"Mashco Piro"}, ["cuk"] = {"San Blas Kuna"}, ["cul"] = {"Culina", "Kulina"}, ["cuo"] = {"Cumanagoto"}, ["cup"] = {"Cupeño"}, ["cuq"] = {"Cun"}, ["cur"] = {"Chhulung"}, ["cus"] = {"Cushitic languages"}, ["cut"] = {"Teutila Cuicatec"}, ["cuu"] = {"Tai Ya"}, ["cuv"] = {"Cuvok"}, ["cuw"] = {"Chukwa"}, ["cux"] = {"Tepeuxila Cuicatec"}, ["cuy"] = {"Cuitlatec"}, ["cvg"] = {"Chug"}, ["cvn"] = {"Valle Nacional Chinantec"}, ["cwa"] = {"Kabwa"}, ["cwb"] = {"Maindo"}, ["cwd"] = {"Woods Cree"}, ["cwe"] = {"Kwere"}, ["cwg"] = {"Chewong", "Cheq Wong"}, ["cwt"] = {"Kuwaataay"}, ["cxh"] = {"Cha'ari"}, ["cya"] = {"Nopala Chatino"}, ["cyb"] = {"Cayubaba"}, ["cyo"] = {"Cuyonon"}, ["czh"] = {"Huizhou Chinese"}, ["czk"] = {"Knaanic"}, ["czn"] = {"Zenzontepec Chatino"}, ["czo"] = {"Min Zhong Chinese"}, ["czt"] = {"Zotung Chin"}, ["daa"] = {"Dangaléat"}, ["dac"] = {"Dambi"}, ["dad"] = {"Marik"}, ["dae"] = {"Duupa"}, ["dag"] = {"Dagbani"}, ["dah"] = {"Gwahatike"}, ["dai"] = {"Day"}, ["daj"] = {"Dar Fur Daju"}, ["dak"] = {"Dakota"}, ["dal"] = {"Dahalo"}, ["dam"] = {"Damakawa"}, ["dao"] = {"Daai Chin"}, ["daq"] = {"Dandami Maria"}, ["dar"] = {"Dargwa"}, ["das"] = {"Daho-Doo"}, ["dau"] = {"Dar Sila Daju"}, ["dav"] = {"Taita", "Dawida"}, ["daw"] = {"Davawenyo"}, ["dax"] = {"Dayi"}, ["day"] = {"Land Dayak languages"}, ["daz"] = {"Dao"}, ["dba"] = {"Bangime"}, ["dbb"] = {"Deno"}, ["dbd"] = {"Dadiya"}, ["dbe"] = {"Dabe"}, ["dbf"] = {"Edopi"}, ["dbg"] = {"Dogul Dom Dogon"}, ["dbi"] = {"Doka"}, ["dbj"] = {"Ida'an"}, ["dbl"] = {"Dyirbal"}, ["dbm"] = {"Duguri"}, ["dbn"] = {"Duriankere"}, ["dbo"] = {"Dulbu"}, ["dbp"] = {"Duwai"}, ["dbq"] = {"Daba"}, ["dbr"] = {"Dabarre"}, ["dbt"] = {"Ben Tey Dogon"}, ["dbu"] = {"Bondum Dom Dogon"}, ["dbv"] = {"Dungu"}, ["dbw"] = {"Bankan Tey Dogon"}, ["dby"] = {"Dibiyaso"}, ["dcc"] = {"Deccan"}, ["dcr"] = {"Negerhollands"}, ["dda"] = {"Dadi Dadi"}, ["ddd"] = {"Dongotono"}, ["dde"] = {"Doondo"}, ["ddg"] = {"Fataluku"}, ["ddi"] = {"West Goodenough"}, ["ddj"] = {"Jaru"}, ["ddn"] = {"Dendi (Benin)"}, ["ddo"] = {"Dido"}, ["ddr"] = {"Dhudhuroa"}, ["dds"] = {"Donno So Dogon"}, ["ddw"] = {"Dawera-Daweloor"}, ["dec"] = {"Dagik"}, ["ded"] = {"Dedua"}, ["dee"] = {"Dewoin"}, ["def"] = {"Dezfuli"}, ["deg"] = {"Degema"}, ["deh"] = {"Dehwari"}, ["dei"] = {"Demisa"}, ["dek"] = {"Dek"}, ["del"] = {"Delaware"}, ["dem"] = {"Dem"}, ["den"] = {"Slave (Athapascan)"}, ["dep"] = {"Pidgin Delaware"}, ["deq"] = {"Dendi (Central African Republic)"}, ["der"] = {"Deori"}, ["des"] = {"Desano"}, ["dev"] = {"Domung"}, ["dez"] = {"Dengese"}, ["dga"] = {"Southern Dagaare"}, ["dgb"] = {"Bunoge Dogon"}, ["dgc"] = {"Casiguran Dumagat Agta"}, ["dgd"] = {"Dagaari Dioula"}, ["dge"] = {"Degenan"}, ["dgg"] = {"Doga"}, ["dgh"] = {"Dghwede"}, ["dgi"] = {"Northern Dagara"}, ["dgk"] = {"Dagba"}, ["dgl"] = {"Andaandi", "Dongolawi"}, ["dgn"] = {"Dagoman"}, ["dgo"] = {"Dogri (individual language)"}, ["dgr"] = {"Dogrib", "Tłı̨chǫ"}, ["dgs"] = {"Dogoso"}, ["dgt"] = {"Ndra'ngith"}, ["dgw"] = {"Daungwurrung"}, ["dgx"] = {"Doghoro"}, ["dgz"] = {"Daga"}, ["dhd"] = {"Dhundari"}, ["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"}, ["dhi"] = {"Dhimal"}, ["dhl"] = {"Dhalandji"}, ["dhm"] = {"Zemba"}, ["dhn"] = {"Dhanki"}, ["dho"] = {"Dhodia"}, ["dhr"] = {"Dhargari"}, ["dhs"] = {"Dhaiso"}, ["dhu"] = {"Dhurga"}, ["dhv"] = {"Dehu", "Drehu"}, ["dhw"] = {"Dhanwar (Nepal)"}, ["dhx"] = {"Dhungaloo"}, ["dia"] = {"Dia"}, ["dib"] = {"South Central Dinka"}, ["dic"] = {"Lakota Dida"}, ["did"] = {"Didinga"}, ["dif"] = {"Dieri", "Diyari"}, ["dig"] = {"Digo", "Chidigo"}, ["dih"] = {"Kumiai"}, ["dii"] = {"Dimbong"}, ["dij"] = {"Dai"}, ["dik"] = {"Southwestern Dinka"}, ["dil"] = {"Dilling"}, ["dim"] = {"Dime"}, ["din"] = {"Dinka"}, ["dio"] = {"Dibo"}, ["dip"] = {"Northeastern Dinka"}, ["diq"] = {"Dimli (individual language)"}, ["dir"] = {"Dirim"}, ["dis"] = {"Dimasa"}, ["diu"] = {"Diriku"}, ["diw"] = {"Northwestern Dinka"}, ["dix"] = {"Dixon Reef"}, ["diy"] = {"Diuwe"}, ["diz"] = {"Ding"}, ["dja"] = {"Djadjawurrung"}, ["djb"] = {"Djinba"}, ["djc"] = {"Dar Daju Daju"}, ["djd"] = {"Djamindjung", "Ngaliwurru"}, ["dje"] = {"Zarma"}, ["djf"] = {"Djangun"}, ["dji"] = {"Djinang"}, ["djj"] = {"Djeebbana"}, ["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"}, ["djm"] = {"Jamsay Dogon"}, ["djn"] = {"Jawoyn", "Djauan"}, ["djo"] = {"Jangkang"}, ["djr"] = {"Djambarrpuyngu"}, ["dju"] = {"Kapriman"}, ["djw"] = {"Djawi"}, ["dka"] = {"Dakpakha"}, ["dkg"] = {"Kadung"}, ["dkk"] = {"Dakka"}, ["dkr"] = {"Kuijau"}, ["dks"] = {"Southeastern Dinka"}, ["dkx"] = {"Mazagway"}, ["dlg"] = {"Dolgan"}, ["dlk"] = {"Dahalik"}, ["dlm"] = {"Dalmatian"}, ["dln"] = {"Darlong"}, ["dma"] = {"Duma"}, ["dmb"] = {"Mombo Dogon"}, ["dmc"] = {"Gavak"}, ["dmd"] = {"Madhi Madhi"}, ["dme"] = {"Dugwor"}, ["dmf"] = {"Medefaidrin"}, ["dmg"] = {"Upper Kinabatangan"}, ["dmk"] = {"Domaaki"}, ["dml"] = {"Dameli"}, ["dmm"] = {"Dama"}, ["dmn"] = {"Mande languages"}, ["dmo"] = {"Kemedzung"}, ["dmr"] = {"East Damar"}, ["dms"] = {"Dampelas"}, ["dmu"] = {"Dubu", "Tebi"}, ["dmv"] = {"Dumpas"}, ["dmw"] = {"Mudburra"}, ["dmx"] = {"Dema"}, ["dmy"] = {"Demta", "Sowari"}, ["dna"] = {"Upper Grand Valley Dani"}, ["dnd"] = {"Daonda"}, ["dne"] = {"Ndendeule"}, ["dng"] = {"Dungan"}, ["dni"] = {"Lower Grand Valley Dani"}, ["dnj"] = {"Dan"}, ["dnk"] = {"Dengka"}, ["dnn"] = {"Dzùùngoo"}, ["dno"] = {"Ndrulo", "Northern Lendu"}, ["dnr"] = {"Danaru"}, ["dnt"] = {"Mid Grand Valley Dani"}, ["dnu"] = {"Danau"}, ["dnv"] = {"Danu"}, ["dnw"] = {"Western Dani"}, ["dny"] = {"Dení"}, ["doa"] = {"Dom"}, ["dob"] = {"Dobu"}, ["doc"] = {"Northern Dong"}, ["doe"] = {"Doe"}, ["dof"] = {"Domu"}, ["doh"] = {"Dong"}, ["doi"] = {"Dogri (macrolanguage)"}, ["dok"] = {"Dondo"}, ["dol"] = {"Doso"}, ["don"] = {"Toura (Papua New Guinea)"}, ["doo"] = {"Dongo"}, ["dop"] = {"Lukpa"}, ["doq"] = {"Dominican Sign Language"}, ["dor"] = {"Dori'o"}, ["dos"] = {"Dogosé"}, ["dot"] = {"Dass"}, ["dov"] = {"Dombe"}, ["dow"] = {"Doyayo"}, ["dox"] = {"Bussa"}, ["doy"] = {"Dompo"}, ["doz"] = {"Dorze"}, ["dpp"] = {"Papar"}, ["dra"] = {"Dravidian languages"}, ["drb"] = {"Dair"}, ["drc"] = {"Minderico"}, ["drd"] = {"Darmiya"}, ["dre"] = {"Dolpo"}, ["drg"] = {"Rungus"}, ["dri"] = {"C'Lela"}, ["drl"] = {"Paakantyi"}, ["drn"] = {"West Damar"}, ["dro"] = {"Daro-Matu Melanau"}, ["drq"] = {"Dura"}, ["drs"] = {"Gedeo"}, ["drt"] = {"Drents"}, ["dru"] = {"Rukai"}, ["dry"] = {"Darai"}, ["dsb"] = {"Lower Sorbian"}, ["dse"] = {"Dutch Sign Language"}, ["dsh"] = {"Daasanach"}, ["dsi"] = {"Disa"}, ["dsk"] = {"Dokshi"}, ["dsl"] = {"Danish Sign Language"}, ["dsn"] = {"Dusner"}, ["dso"] = {"Desiya"}, ["dsq"] = {"Tadaksahak"}, ["dsz"] = {"Mardin Sign Language"}, ["dta"] = {"Daur"}, ["dtb"] = {"Labuk-Kinabatangan Kadazan"}, ["dtd"] = {"Ditidaht"}, ["dth"] = {"Adithinngithigh"}, ["dti"] = {"Ana Tinga Dogon"}, ["dtk"] = {"Tene Kan Dogon"}, ["dtm"] = {"Tomo Kan Dogon"}, ["dtn"] = {"Daatsʼíin"}, ["dto"] = {"Tommo So Dogon"}, ["dtp"] = {"Kadazan Dusun", "Central Dusun"}, ["dtr"] = {"Lotud"}, ["dts"] = {"Toro So Dogon"}, ["dtt"] = {"Toro Tegu Dogon"}, ["dtu"] = {"Tebul Ure Dogon"}, ["dty"] = {"Dotyali"}, ["dua"] = {"Duala"}, ["dub"] = {"Dubli"}, ["duc"] = {"Duna"}, ["due"] = {"Umiray Dumaget Agta"}, ["duf"] = {"Dumbea", "Drubea"}, ["dug"] = {"Duruma", "Chiduruma"}, ["duh"] = {"Dungra Bhil"}, ["dui"] = {"Dumun"}, ["duk"] = {"Uyajitaya"}, ["dul"] = {"Alabat Island Agta"}, ["dum"] = {"Middle Dutch (ca. 1050-1350)"}, ["dun"] = {"Dusun Deyah"}, ["duo"] = {"Dupaninan Agta"}, ["dup"] = {"Duano"}, ["duq"] = {"Dusun Malang"}, ["dur"] = {"Dii"}, ["dus"] = {"Dumi"}, ["duu"] = {"Drung"}, ["duv"] = {"Duvle"}, ["duw"] = {"Dusun Witu"}, ["dux"] = {"Duungooma"}, ["duy"] = {"Dicamay Agta"}, ["duz"] = {"Duli-Gey"}, ["dva"] = {"Duau"}, ["dwa"] = {"Diri"}, ["dwk"] = {"Dawik Kui"}, ["dwr"] = {"Dawro"}, ["dws"] = {"Dutton World Speedwords"}, ["dwu"] = {"Dhuwal"}, ["dww"] = {"Dawawa"}, ["dwy"] = {"Dhuwaya"}, ["dwz"] = {"Dewas Rai"}, ["dya"] = {"Dyan"}, ["dyb"] = {"Dyaberdyaber"}, ["dyd"] = {"Dyugun"}, ["dyg"] = {"Villa Viciosa Agta"}, ["dyi"] = {"Djimini Senoufo"}, ["dym"] = {"Yanda Dom Dogon"}, ["dyn"] = {"Dyangadi", "Dhanggatti"}, ["dyo"] = {"Jola-Fonyi"}, ["dyr"] = {"Dyarim"}, ["dyu"] = {"Dyula"}, ["dyy"] = {"Djabugay", "Dyaabugay"}, ["dza"] = {"Tunzu"}, ["dzd"] = {"Daza"}, ["dze"] = {"Djiwarli"}, ["dzg"] = {"Dazaga"}, ["dzl"] = {"Dzalakha"}, ["dzn"] = {"Dzando"}, ["eaa"] = {"Karenggapa"}, ["ebc"] = {"Beginci"}, ["ebg"] = {"Ebughu"}, ["ebk"] = {"Eastern Bontok"}, ["ebo"] = {"Teke-Ebo"}, ["ebr"] = {"Ebrié"}, ["ebu"] = {"Embu", "Kiembu"}, ["ecr"] = {"Eteocretan"}, ["ecs"] = {"Ecuadorian Sign Language"}, ["ecy"] = {"Eteocypriot"}, ["eee"] = {"E"}, ["efa"] = {"Efai"}, ["efe"] = {"Efe"}, ["efi"] = {"Efik"}, ["ega"] = {"Ega"}, ["egl"] = {"Emilian"}, ["egm"] = {"Benamanga"}, ["ego"] = {"Eggon"}, ["egx"] = {"Egyptian languages"}, ["egy"] = {"Egyptian (Ancient)"}, ["ehs"] = {"Miyakubo Sign Language"}, ["ehu"] = {"Ehueun"}, ["eip"] = {"Eipomek"}, ["eit"] = {"Eitiep"}, ["eiv"] = {"Askopan"}, ["eja"] = {"Ejamat"}, ["eka"] = {"Ekajuk"}, ["eke"] = {"Ekit"}, ["ekg"] = {"Ekari"}, ["eki"] = {"Eki"}, ["ekk"] = {"Standard Estonian"}, ["ekl"] = {"Kol (Bangladesh)", "Kol"}, ["ekm"] = {"Elip"}, ["eko"] = {"Koti"}, ["ekp"] = {"Ekpeye"}, ["ekr"] = {"Yace"}, ["eky"] = {"Eastern Kayah"}, ["ele"] = {"Elepi"}, ["elh"] = {"El Hugeirat"}, ["eli"] = {"Nding"}, ["elk"] = {"Elkei"}, ["elm"] = {"Eleme"}, ["elo"] = {"El Molo"}, ["elu"] = {"Elu"}, ["elx"] = {"Elamite"}, ["ema"] = {"Emai-Iuleha-Ora"}, ["emb"] = {"Embaloh"}, ["eme"] = {"Emerillon"}, ["emg"] = {"Eastern Meohang"}, ["emi"] = {"Mussau-Emira"}, ["emk"] = {"Eastern Maninkakan"}, ["emm"] = {"Mamulique"}, ["emn"] = {"Eman"}, ["emp"] = {"Northern Emberá"}, ["emq"] = {"Eastern Minyag"}, ["ems"] = {"Pacific Gulf Yupik"}, ["emu"] = {"Eastern Muria"}, ["emw"] = {"Emplawas"}, ["emx"] = {"Erromintxela"}, ["emy"] = {"Epigraphic Mayan"}, ["emz"] = {"Mbessa"}, ["ena"] = {"Apali"}, ["enb"] = {"Markweeta"}, ["enc"] = {"En"}, ["end"] = {"Ende"}, ["enf"] = {"Forest Enets"}, ["enh"] = {"Tundra Enets"}, ["enl"] = {"Enlhet"}, ["enm"] = {"Middle English (1100-1500)"}, ["enn"] = {"Engenni"}, ["eno"] = {"Enggano"}, ["enq"] = {"Enga"}, ["enr"] = {"Emumu", "Emem"}, ["enu"] = {"Enu"}, ["env"] = {"Enwan (Edo State)"}, ["enw"] = {"Enwan (Akwa Ibom State)"}, ["enx"] = {"Enxet"}, ["eot"] = {"Beti (Côte d'Ivoire)"}, ["epi"] = {"Epie"}, ["era"] = {"Eravallan"}, ["erg"] = {"Sie"}, ["erh"] = {"Eruwa"}, ["eri"] = {"Ogea"}, ["erk"] = {"South Efate"}, ["ero"] = {"Horpa"}, ["err"] = {"Erre"}, ["ers"] = {"Ersu"}, ["ert"] = {"Eritai"}, ["erw"] = {"Erokwanas"}, ["ese"] = {"Ese Ejja"}, ["esg"] = {"Aheri Gondi"}, ["esh"] = {"Eshtehardi"}, ["esi"] = {"North Alaskan Inupiatun"}, ["esk"] = {"Northwest Alaska Inupiatun"}, ["esl"] = {"Egypt Sign Language"}, ["esm"] = {"Esuma"}, ["esn"] = {"Salvadoran Sign Language"}, ["eso"] = {"Estonian Sign Language"}, ["esq"] = {"Esselen"}, ["ess"] = {"Central Siberian Yupik"}, ["esu"] = {"Central Yupik"}, ["esx"] = {"Eskimo-Aleut languages"}, ["esy"] = {"Eskayan"}, ["etb"] = {"Etebi"}, ["etc"] = {"Etchemin"}, ["eth"] = {"Ethiopian Sign Language"}, ["etn"] = {"Eton (Vanuatu)"}, ["eto"] = {"Eton (Cameroon)"}, ["etr"] = {"Edolo"}, ["ets"] = {"Yekhee"}, ["ett"] = {"Etruscan"}, ["etu"] = {"Ejagham"}, ["etx"] = {"Eten"}, ["etz"] = {"Semimi"}, ["eud"] = {"Eudeve"}, ["euq"] = {"Basque (family)"}, ["eve"] = {"Even"}, ["evh"] = {"Uvbie"}, ["evn"] = {"Evenki"}, ["ewo"] = {"Ewondo"}, ["ext"] = {"Extremaduran"}, ["eya"] = {"Eyak"}, ["eyo"] = {"Keiyo"}, ["eza"] = {"Ezaa"}, ["eze"] = {"Uzekwe"}, ["faa"] = {"Fasu"}, ["fab"] = {"Fa d'Ambu"}, ["fad"] = {"Wagi"}, ["faf"] = {"Fagani"}, ["fag"] = {"Finongan"}, ["fah"] = {"Baissa Fali"}, ["fai"] = {"Faiwol"}, ["faj"] = {"Faita"}, ["fak"] = {"Fang (Cameroon)"}, ["fal"] = {"South Fali"}, ["fam"] = {"Fam"}, ["fan"] = {"Fang (Equatorial Guinea)"}, ["fap"] = {"Paloor"}, ["far"] = {"Fataleka"}, ["fat"] = {"Fanti"}, ["fau"] = {"Fayu"}, ["fax"] = {"Fala"}, ["fay"] = {"Southwestern Fars"}, ["faz"] = {"Northwestern Fars"}, ["fbl"] = {"West Albay Bikol"}, ["fcs"] = {"Quebec Sign Language"}, ["fer"] = {"Feroge"}, ["ffi"] = {"Foia Foia"}, ["ffm"] = {"Maasina Fulfulde"}, ["fgr"] = {"Fongoro"}, ["fia"] = {"Nobiin"}, ["fie"] = {"Fyer"}, ["fif"] = {"Faifi"}, ["fil"] = {"Filipino", "Pilipino"}, ["fip"] = {"Fipa"}, ["fir"] = {"Firan"}, ["fit"] = {"Tornedalen Finnish", "Meänkieli"}, ["fiu"] = {"Finno-Ugrian languages"}, ["fiw"] = {"Fiwaga"}, ["fkk"] = {"Kirya-Konzəl"}, ["fkv"] = {"Kven Finnish"}, ["fla"] = {"Kalispel-Pend d'Oreille"}, ["flh"] = {"Foau"}, ["fli"] = {"Fali"}, ["fll"] = {"North Fali"}, ["fln"] = {"Flinders Island"}, ["flr"] = {"Fuliiru"}, ["fly"] = {"Flaaitaal", "Tsotsitaal"}, ["fmp"] = {"Fe'fe'"}, ["fmu"] = {"Far Western Muria"}, ["fnb"] = {"Fanbak"}, ["fng"] = {"Fanagalo"}, ["fni"] = {"Fania"}, ["fod"] = {"Foodo"}, ["foi"] = {"Foi"}, ["fom"] = {"Foma"}, ["fon"] = {"Fon"}, ["for"] = {"Fore"}, ["fos"] = {"Siraya"}, ["fox"] = {"Formosan languages"}, ["fpe"] = {"Fernando Po Creole English"}, ["fqs"] = {"Fas"}, ["frc"] = {"Cajun French"}, ["frd"] = {"Fordata"}, ["frk"] = {"Frankish"}, ["frm"] = {"Middle French (ca. 1400-1600)"}, ["fro"] = {"Old French (842-ca. 1400)"}, ["frp"] = {"Arpitan", "Francoprovençal"}, ["frq"] = {"Forak"}, ["frr"] = {"Northern Frisian"}, ["frs"] = {"Eastern Frisian"}, ["frt"] = {"Fortsenal"}, ["fse"] = {"Finnish Sign Language"}, ["fsl"] = {"French Sign Language"}, ["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"}, ["fub"] = {"Adamawa Fulfulde"}, ["fuc"] = {"Pulaar"}, ["fud"] = {"East Futuna"}, ["fue"] = {"Borgu Fulfulde"}, ["fuf"] = {"Pular"}, ["fuh"] = {"Western Niger Fulfulde"}, ["fui"] = {"Bagirmi Fulfulde"}, ["fuj"] = {"Ko"}, ["fum"] = {"Fum"}, ["fun"] = {"Fulniô"}, ["fuq"] = {"Central-Eastern Niger Fulfulde"}, ["fur"] = {"Friulian"}, ["fut"] = {"Futuna-Aniwa"}, ["fuu"] = {"Furu"}, ["fuv"] = {"Nigerian Fulfulde"}, ["fuy"] = {"Fuyug"}, ["fvr"] = {"Fur"}, ["fwa"] = {"Fwâi"}, ["fwe"] = {"Fwe"}, ["gaa"] = {"Ga"}, ["gab"] = {"Gabri"}, ["gac"] = {"Mixed Great Andamanese"}, ["gad"] = {"Gaddang"}, ["gae"] = {"Guarequena"}, ["gaf"] = {"Gende"}, ["gag"] = {"Gagauz"}, ["gah"] = {"Alekano"}, ["gai"] = {"Borei"}, ["gaj"] = {"Gadsup"}, ["gak"] = {"Gamkonora"}, ["gal"] = {"Galolen"}, ["gam"] = {"Kandawo"}, ["gan"] = {"Gan Chinese"}, ["gao"] = {"Gants"}, ["gap"] = {"Gal"}, ["gaq"] = {"Gata'"}, ["gar"] = {"Galeya"}, ["gas"] = {"Adiwasi Garasia"}, ["gat"] = {"Kenati"}, ["gau"] = {"Mudhili Gadaba"}, ["gaw"] = {"Nobonob"}, ["gax"] = {"Borana-Arsi-Guji Oromo"}, ["gay"] = {"Gayo"}, ["gaz"] = {"West Central Oromo"}, ["gba"] = {"Gbaya (Central African Republic)"}, ["gbb"] = {"Kaytetye"}, ["gbd"] = {"Karajarri"}, ["gbe"] = {"Niksek"}, ["gbf"] = {"Gaikundi"}, ["gbg"] = {"Gbanziri"}, ["gbh"] = {"Defi Gbe"}, ["gbi"] = {"Galela"}, ["gbj"] = {"Bodo Gadaba"}, ["gbk"] = {"Gaddi"}, ["gbl"] = {"Gamit"}, ["gbm"] = {"Garhwali"}, ["gbn"] = {"Mo'da"}, ["gbo"] = {"Northern Grebo"}, ["gbp"] = {"Gbaya-Bossangoa"}, ["gbq"] = {"Gbaya-Bozoum"}, ["gbr"] = {"Gbagyi"}, ["gbs"] = {"Gbesi Gbe"}, ["gbu"] = {"Gagadu"}, ["gbv"] = {"Gbanu"}, ["gbw"] = {"Gabi-Gabi"}, ["gbx"] = {"Eastern Xwla Gbe"}, ["gby"] = {"Gbari"}, ["gbz"] = {"Zoroastrian Dari"}, ["gcc"] = {"Mali"}, ["gcd"] = {"Ganggalida"}, ["gce"] = {"Galice"}, ["gcf"] = {"Guadeloupean Creole French"}, ["gcl"] = {"Grenadian Creole English"}, ["gcn"] = {"Gaina"}, ["gcr"] = {"Guianese Creole French"}, ["gct"] = {"Colonia Tovar German"}, ["gda"] = {"Gade Lohar"}, ["gdb"] = {"Pottangi Ollar Gadaba"}, ["gdc"] = {"Gugu Badhun"}, ["gdd"] = {"Gedaged"}, ["gde"] = {"Gude"}, ["gdf"] = {"Guduf-Gava"}, ["gdg"] = {"Ga'dang"}, ["gdh"] = {"Gadjerawang", "Gajirrabeng"}, ["gdi"] = {"Gundi"}, ["gdj"] = {"Gurdjar"}, ["gdk"] = {"Gadang"}, ["gdl"] = {"Dirasha"}, ["gdm"] = {"Laal"}, ["gdn"] = {"Umanakaina"}, ["gdo"] = {"Ghodoberi"}, ["gdq"] = {"Mehri"}, ["gdr"] = {"Wipi"}, ["gds"] = {"Ghandruk Sign Language"}, ["gdt"] = {"Kungardutyi"}, ["gdu"] = {"Gudu"}, ["gdx"] = {"Godwari"}, ["gea"] = {"Geruma"}, ["geb"] = {"Kire"}, ["gec"] = {"Gboloo Grebo"}, ["ged"] = {"Gade"}, ["gef"] = {"Gerai"}, ["geg"] = {"Gengle"}, ["geh"] = {"Hutterite German", "Hutterisch"}, ["gei"] = {"Gebe"}, ["gej"] = {"Gen"}, ["gek"] = {"Ywom"}, ["gel"] = {"ut-Ma'in"}, ["gem"] = {"Germanic languages"}, ["geq"] = {"Geme"}, ["ges"] = {"Geser-Gorom"}, ["gev"] = {"Eviya"}, ["gew"] = {"Gera"}, ["gex"] = {"Garre"}, ["gey"] = {"Enya"}, ["gez"] = {"Geez"}, ["gfk"] = {"Patpatar"}, ["gft"] = {"Gafat"}, ["gga"] = {"Gao"}, ["ggb"] = {"Gbii"}, ["ggd"] = {"Gugadj"}, ["gge"] = {"Gurr-goni"}, ["ggg"] = {"Gurgula"}, ["ggk"] = {"Kungarakany"}, ["ggl"] = {"Ganglau"}, ["ggt"] = {"Gitua"}, ["ggu"] = {"Gagu", "Gban"}, ["ggw"] = {"Gogodala"}, ["gha"] = {"Ghadamès"}, ["ghc"] = {"Hiberno-Scottish Gaelic"}, ["ghe"] = {"Southern Ghale"}, ["ghh"] = {"Northern Ghale"}, ["ghk"] = {"Geko Karen"}, ["ghl"] = {"Ghulfan"}, ["ghn"] = {"Ghanongga"}, ["gho"] = {"Ghomara"}, ["ghr"] = {"Ghera"}, ["ghs"] = {"Guhu-Samane"}, ["ght"] = {"Kuke", "Kutang Ghale"}, ["gia"] = {"Kija"}, ["gib"] = {"Gibanawa"}, ["gic"] = {"Gail"}, ["gid"] = {"Gidar"}, ["gie"] = {"Gaɓogbo", "Guébie"}, ["gig"] = {"Goaria"}, ["gih"] = {"Githabul"}, ["gii"] = {"Girirra"}, ["gil"] = {"Gilbertese"}, ["gim"] = {"Gimi (Eastern Highlands)"}, ["gin"] = {"Hinukh"}, ["gip"] = {"Gimi (West New Britain)"}, ["giq"] = {"Green Gelao"}, ["gir"] = {"Red Gelao"}, ["gis"] = {"North Giziga"}, ["git"] = {"Gitxsan"}, ["giu"] = {"Mulao"}, ["giw"] = {"White Gelao"}, ["gix"] = {"Gilima"}, ["giy"] = {"Giyug"}, ["giz"] = {"South Giziga"}, ["gjk"] = {"Kachi Koli"}, ["gjm"] = {"Gunditjmara"}, ["gjn"] = {"Gonja"}, ["gjr"] = {"Gurindji Kriol"}, ["gju"] = {"Gujari"}, ["gka"] = {"Guya"}, ["gkd"] = {"Magɨ (Madang Province)"}, ["gke"] = {"Ndai"}, ["gkn"] = {"Gokana"}, ["gko"] = {"Kok-Nar"}, ["gkp"] = {"Guinea Kpelle"}, ["gku"] = {"ǂUngkue"}, ["glb"] = {"Belning"}, ["glc"] = {"Bon Gula"}, ["gld"] = {"Nanai"}, ["glh"] = {"Northwest Pashai", "Northwest Pashayi"}, ["glj"] = {"Gula Iro"}, ["glk"] = {"Gilaki"}, ["gll"] = {"Garlali"}, ["glo"] = {"Galambu"}, ["glr"] = {"Glaro-Twabo"}, ["glu"] = {"Gula (Chad)"}, ["glw"] = {"Glavda"}, ["gly"] = {"Gule"}, ["gma"] = {"Gambera"}, ["gmb"] = {"Gula'alaa"}, ["gmd"] = {"Mághdì"}, ["gme"] = {"East Germanic languages"}, ["gmg"] = {"Magɨyi"}, ["gmh"] = {"Middle High German (ca. 1050-1500)"}, ["gml"] = {"Middle Low German"}, ["gmm"] = {"Gbaya-Mbodomo"}, ["gmn"] = {"Gimnime"}, ["gmq"] = {"North Germanic languages"}, ["gmr"] = {"Mirning", "Mirniny"}, ["gmu"] = {"Gumalu"}, ["gmv"] = {"Gamo"}, ["gmw"] = {"West Germanic languages"}, ["gmx"] = {"Magoma"}, ["gmy"] = {"Mycenaean Greek"}, ["gmz"] = {"Mgbolizhia"}, ["gna"] = {"Kaansa"}, ["gnb"] = {"Gangte"}, ["gnc"] = {"Guanche"}, ["gnd"] = {"Zulgo-Gemzek"}, ["gne"] = {"Ganang"}, ["gng"] = {"Ngangam"}, ["gnh"] = {"Lere"}, ["gni"] = {"Gooniyandi"}, ["gnj"] = {"Ngen"}, ["gnk"] = {"ǁGana"}, ["gnl"] = {"Gangulu"}, ["gnm"] = {"Ginuman"}, ["gnn"] = {"Gumatj"}, ["gno"] = {"Northern Gondi"}, ["gnq"] = {"Gana"}, ["gnr"] = {"Gureng Gureng"}, ["gnt"] = {"Guntai"}, ["gnu"] = {"Gnau"}, ["gnw"] = {"Western Bolivian Guaraní"}, ["gnz"] = {"Ganzi"}, ["goa"] = {"Guro"}, ["gob"] = {"Playero"}, ["goc"] = {"Gorakor"}, ["god"] = {"Godié"}, ["goe"] = {"Gongduk"}, ["gof"] = {"Gofa"}, ["gog"] = {"Gogo"}, ["goh"] = {"Old High German (ca. 750-1050)"}, ["goi"] = {"Gobasi"}, ["goj"] = {"Gowlan"}, ["gok"] = {"Gowli"}, ["gol"] = {"Gola"}, ["gom"] = {"Goan Konkani"}, ["gon"] = {"Gondi"}, ["goo"] = {"Gone Dau"}, ["gop"] = {"Yeretuar"}, ["goq"] = {"Gorap"}, ["gor"] = {"Gorontalo"}, ["gos"] = {"Gronings"}, ["got"] = {"Gothic"}, ["gou"] = {"Gavar"}, ["gov"] = {"Goo"}, ["gow"] = {"Gorowa"}, ["gox"] = {"Gobu"}, ["goy"] = {"Goundo"}, ["goz"] = {"Gozarkhani"}, ["gpa"] = {"Gupa-Abawa"}, ["gpe"] = {"Ghanaian Pidgin English"}, ["gpn"] = {"Taiap"}, ["gqa"] = {"Ga'anda"}, ["gqi"] = {"Guiqiong"}, ["gqn"] = {"Guana (Brazil)"}, ["gqr"] = {"Gor"}, ["gqu"] = {"Qau"}, ["gra"] = {"Rajput Garasia"}, ["grb"] = {"Grebo"}, ["grc"] = {"Ancient Greek (to 1453)"}, ["grd"] = {"Guruntum-Mbaaru"}, ["grg"] = {"Madi"}, ["grh"] = {"Gbiri-Niragu"}, ["gri"] = {"Ghari"}, ["grj"] = {"Southern Grebo"}, ["grk"] = {"Greek languages"}, ["grm"] = {"Kota Marudu Talantang"}, ["gro"] = {"Groma"}, ["grq"] = {"Gorovu"}, ["grr"] = {"Taznatit"}, ["grs"] = {"Gresi"}, ["grt"] = {"Garo"}, ["gru"] = {"Kistane"}, ["grv"] = {"Central Grebo"}, ["grw"] = {"Gweda"}, ["grx"] = {"Guriaso"}, ["gry"] = {"Barclayville Grebo"}, ["grz"] = {"Guramalum"}, ["gse"] = {"Ghanaian Sign Language"}, ["gsg"] = {"German Sign Language"}, ["gsl"] = {"Gusilay"}, ["gsm"] = {"Guatemalan Sign Language"}, ["gsn"] = {"Nema", "Gusan"}, ["gso"] = {"Southwest Gbaya"}, ["gsp"] = {"Wasembo"}, ["gss"] = {"Greek Sign Language"}, ["gsw"] = {"Swiss German", "Alemannic", "Alsatian"}, ["gta"] = {"Guató"}, ["gtu"] = {"Aghu-Tharnggala"}, ["gua"] = {"Shiki"}, ["gub"] = {"Guajajára"}, ["guc"] = {"Wayuu"}, ["gud"] = {"Yocoboué Dida"}, ["gue"] = {"Gurindji"}, ["guf"] = {"Gupapuyngu"}, ["gug"] = {"Paraguayan Guaraní"}, ["guh"] = {"Guahibo"}, ["gui"] = {"Eastern Bolivian Guaraní"}, ["guk"] = {"Gumuz"}, ["gul"] = {"Sea Island Creole English"}, ["gum"] = {"Guambiano"}, ["gun"] = {"Mbyá Guaraní"}, ["guo"] = {"Guayabero"}, ["gup"] = {"Gunwinggu"}, ["guq"] = {"Aché"}, ["gur"] = {"Farefare"}, ["gus"] = {"Guinean Sign Language"}, ["gut"] = {"Maléku Jaíka"}, ["guu"] = {"Yanomamö"}, ["guw"] = {"Gun"}, ["gux"] = {"Gourmanchéma"}, ["guz"] = {"Gusii", "Ekegusii"}, ["gva"] = {"Guana (Paraguay)"}, ["gvc"] = {"Guanano"}, ["gve"] = {"Duwet"}, ["gvf"] = {"Golin"}, ["gvj"] = {"Guajá"}, ["gvl"] = {"Gulay"}, ["gvm"] = {"Gurmana"}, ["gvn"] = {"Kuku-Yalanji"}, ["gvo"] = {"Gavião Do Jiparaná"}, ["gvp"] = {"Pará Gavião"}, ["gvr"] = {"Gurung"}, ["gvs"] = {"Gumawana"}, ["gvy"] = {"Guyani"}, ["gwa"] = {"Mbato"}, ["gwb"] = {"Gwa"}, ["gwc"] = {"Gawri", "Kalami"}, ["gwd"] = {"Gawwada"}, ["gwe"] = {"Gweno"}, ["gwf"] = {"Gowro"}, ["gwg"] = {"Moo"}, ["gwi"] = {"Gwichʼin"}, ["gwj"] = {"ǀGwi"}, ["gwm"] = {"Awngthim"}, ["gwn"] = {"Gwandara"}, ["gwr"] = {"Gwere"}, ["gwt"] = {"Gawar-Bati"}, ["gwu"] = {"Guwamu"}, ["gww"] = {"Kwini"}, ["gwx"] = {"Gua"}, ["gxx"] = {"Wè Southern"}, ["gya"] = {"Northwest Gbaya"}, ["gyb"] = {"Garus"}, ["gyd"] = {"Kayardild"}, ["gye"] = {"Gyem"}, ["gyf"] = {"Gungabula"}, ["gyg"] = {"Gbayi"}, ["gyi"] = {"Gyele"}, ["gyl"] = {"Gayil"}, ["gym"] = {"Ngäbere"}, ["gyn"] = {"Guyanese Creole English"}, ["gyo"] = {"Gyalsumdo"}, ["gyr"] = {"Guarayu"}, ["gyy"] = {"Gunya"}, ["gyz"] = {"Geji", "Gyaazi"}, ["gza"] = {"Ganza"}, ["gzi"] = {"Gazi"}, ["gzn"] = {"Gane"}, ["haa"] = {"Han"}, ["hab"] = {"Hanoi Sign Language"}, ["hac"] = {"Gurani"}, ["had"] = {"Hatam"}, ["hae"] = {"Eastern Oromo"}, ["haf"] = {"Haiphong Sign Language"}, ["hag"] = {"Hanga"}, ["hah"] = {"Hahon"}, ["hai"] = {"Haida"}, ["haj"] = {"Hajong"}, ["hak"] = {"Hakka Chinese"}, ["hal"] = {"Halang"}, ["ham"] = {"Hewa"}, ["han"] = {"Hangaza"}, ["hao"] = {"Hakö"}, ["hap"] = {"Hupla"}, ["haq"] = {"Ha"}, ["har"] = {"Harari"}, ["has"] = {"Haisla"}, ["hav"] = {"Havu"}, ["haw"] = {"Hawaiian"}, ["hax"] = {"Southern Haida"}, ["hay"] = {"Haya"}, ["haz"] = {"Hazaragi"}, ["hba"] = {"Hamba"}, ["hbb"] = {"Huba"}, ["hbn"] = {"Heiban"}, ["hbo"] = {"Ancient Hebrew"}, ["hbu"] = {"Habu"}, ["hca"] = {"Andaman Creole Hindi"}, ["hch"] = {"Huichol"}, ["hdn"] = {"Northern Haida"}, ["hds"] = {"Honduras Sign Language"}, ["hdy"] = {"Hadiyya"}, ["hea"] = {"Northern Qiandong Miao"}, ["hed"] = {"Herdé"}, ["heg"] = {"Helong"}, ["heh"] = {"Hehe"}, ["hei"] = {"Heiltsuk"}, ["hem"] = {"Hemba"}, ["hgm"] = {"Haiǁom"}, ["hgw"] = {"Haigwai"}, ["hhi"] = {"Hoia Hoia"}, ["hhr"] = {"Kerak"}, ["hhy"] = {"Hoyahoya"}, ["hia"] = {"Lamang"}, ["hib"] = {"Hibito"}, ["hid"] = {"Hidatsa"}, ["hif"] = {"Fiji Hindi"}, ["hig"] = {"Kamwe"}, ["hih"] = {"Pamosu"}, ["hii"] = {"Hinduri"}, ["hij"] = {"Hijuk"}, ["hik"] = {"Seit-Kaitetu"}, ["hil"] = {"Hiligaynon"}, ["him"] = {"Himachali languages", "Western Pahari languages"}, ["hio"] = {"Tsoa"}, ["hir"] = {"Himarimã"}, ["hit"] = {"Hittite"}, ["hiw"] = {"Hiw"}, ["hix"] = {"Hixkaryána"}, ["hji"] = {"Haji"}, ["hka"] = {"Kahe"}, ["hke"] = {"Hunde"}, ["hkh"] = {"Khah", "Poguli"}, ["hkk"] = {"Hunjara-Kaina Ke"}, ["hkn"] = {"Mel-Khaonh"}, ["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"}, ["hla"] = {"Halia"}, ["hlb"] = {"Halbi"}, ["hld"] = {"Halang Doan"}, ["hle"] = {"Hlersu"}, ["hlt"] = {"Matu Chin"}, ["hlu"] = {"Hieroglyphic Luwian"}, ["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"}, ["hmb"] = {"Humburi Senni Songhay"}, ["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"}, ["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"}, ["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"}, ["hmf"] = {"Hmong Don"}, ["hmg"] = {"Southwestern Guiyang Hmong"}, ["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"}, ["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"}, ["hmj"] = {"Ge", "Gejia"}, ["hmk"] = {"Maek"}, ["hml"] = {"Luopohe Hmong", "Luopohe Miao"}, ["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"}, ["hmn"] = {"Hmong", "Mong"}, ["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"}, ["hmq"] = {"Eastern Qiandong Miao"}, ["hmr"] = {"Hmar"}, ["hms"] = {"Southern Qiandong Miao"}, ["hmt"] = {"Hamtai"}, ["hmu"] = {"Hamap"}, ["hmv"] = {"Hmong Dô"}, ["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"}, ["hmx"] = {"Hmong-Mien languages"}, ["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"}, ["hmz"] = {"Hmong Shua", "Sinicized Miao"}, ["hna"] = {"Mina (Cameroon)"}, ["hnd"] = {"Southern Hindko"}, ["hne"] = {"Chhattisgarhi"}, ["hng"] = {"Hungu"}, ["hnh"] = {"ǁAni"}, ["hni"] = {"Hani"}, ["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"}, ["hnn"] = {"Hanunoo"}, ["hno"] = {"Northern Hindko"}, ["hns"] = {"Caribbean Hindustani"}, ["hnu"] = {"Hung"}, ["hoa"] = {"Hoava"}, ["hob"] = {"Mari (Madang Province)"}, ["hoc"] = {"Ho"}, ["hod"] = {"Holma"}, ["hoe"] = {"Horom"}, ["hoh"] = {"Hobyót"}, ["hoi"] = {"Holikachuk"}, ["hoj"] = {"Hadothi", "Haroti"}, ["hok"] = {"Hokan languages"}, ["hol"] = {"Holu"}, ["hom"] = {"Homa"}, ["hoo"] = {"Holoholo"}, ["hop"] = {"Hopi"}, ["hor"] = {"Horo"}, ["hos"] = {"Ho Chi Minh City Sign Language"}, ["hot"] = {"Hote", "Malê"}, ["hov"] = {"Hovongan"}, ["how"] = {"Honi"}, ["hoy"] = {"Holiya"}, ["hoz"] = {"Hozo"}, ["hpo"] = {"Hpon"}, ["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"}, ["hra"] = {"Hrangkhol"}, ["hrc"] = {"Niwer Mil"}, ["hre"] = {"Hre"}, ["hrk"] = {"Haruku"}, ["hrm"] = {"Horned Miao"}, ["hro"] = {"Haroi"}, ["hrp"] = {"Nhirrpi"}, ["hrt"] = {"Hértevin"}, ["hru"] = {"Hruso"}, ["hrw"] = {"Warwar Feni"}, ["hrx"] = {"Hunsrik"}, ["hrz"] = {"Harzani"}, ["hsb"] = {"Upper Sorbian"}, ["hsh"] = {"Hungarian Sign Language"}, ["hsl"] = {"Hausa Sign Language"}, ["hsn"] = {"Xiang Chinese"}, ["hss"] = {"Harsusi"}, ["hti"] = {"Hoti"}, ["hto"] = {"Minica Huitoto"}, ["hts"] = {"Hadza"}, ["htu"] = {"Hitu"}, ["htx"] = {"Middle Hittite"}, ["hub"] = {"Huambisa"}, ["huc"] = {"ǂHua", "ǂʼAmkhoe"}, ["hud"] = {"Huaulu"}, ["hue"] = {"San Francisco Del Mar Huave"}, ["huf"] = {"Humene"}, ["hug"] = {"Huachipaeri"}, ["huh"] = {"Huilliche"}, ["hui"] = {"Huli"}, ["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"}, ["huk"] = {"Hulung"}, ["hul"] = {"Hula"}, ["hum"] = {"Hungana"}, ["huo"] = {"Hu"}, ["hup"] = {"Hupa"}, ["huq"] = {"Tsat"}, ["hur"] = {"Halkomelem"}, ["hus"] = {"Huastec"}, ["hut"] = {"Humla"}, ["huu"] = {"Murui Huitoto"}, ["huv"] = {"San Mateo Del Mar Huave"}, ["huw"] = {"Hukumina"}, ["hux"] = {"Nüpode Huitoto"}, ["huy"] = {"Hulaulá"}, ["huz"] = {"Hunzib"}, ["hvc"] = {"Haitian Vodoun Culture Language"}, ["hve"] = {"San Dionisio Del Mar Huave"}, ["hvk"] = {"Haveke"}, ["hvn"] = {"Sabu"}, ["hvv"] = {"Santa María Del Mar Huave"}, ["hwa"] = {"Wané"}, ["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"}, ["hwo"] = {"Hwana"}, ["hya"] = {"Hya"}, ["hyw"] = {"Western Armenian"}, ["hyx"] = {"Armenian (family)"}, ["iai"] = {"Iaai"}, ["ian"] = {"Iatmul"}, ["iar"] = {"Purari"}, ["iba"] = {"Iban"}, ["ibb"] = {"Ibibio"}, ["ibd"] = {"Iwaidja"}, ["ibe"] = {"Akpes"}, ["ibg"] = {"Ibanag"}, ["ibh"] = {"Bih"}, ["ibl"] = {"Ibaloi"}, ["ibm"] = {"Agoi"}, ["ibn"] = {"Ibino"}, ["ibr"] = {"Ibuoro"}, ["ibu"] = {"Ibu"}, ["iby"] = {"Ibani"}, ["ica"] = {"Ede Ica"}, ["ich"] = {"Etkywan"}, ["icl"] = {"Icelandic Sign Language"}, ["icr"] = {"Islander Creole English"}, ["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"}, ["idb"] = {"Indo-Portuguese"}, ["idc"] = {"Idon", "Ajiya"}, ["idd"] = {"Ede Idaca"}, ["ide"] = {"Idere"}, ["idi"] = {"Idi"}, ["idr"] = {"Indri"}, ["ids"] = {"Idesa"}, ["idt"] = {"Idaté"}, ["idu"] = {"Idoma"}, ["ifa"] = {"Amganad Ifugao"}, ["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"}, ["ife"] = {"Ifè"}, ["iff"] = {"Ifo"}, ["ifk"] = {"Tuwali Ifugao"}, ["ifm"] = {"Teke-Fuumu"}, ["ifu"] = {"Mayoyao Ifugao"}, ["ify"] = {"Keley-I Kallahan"}, ["igb"] = {"Ebira"}, ["ige"] = {"Igede"}, ["igg"] = {"Igana"}, ["igl"] = {"Igala"}, ["igm"] = {"Kanggape"}, ["ign"] = {"Ignaciano"}, ["igo"] = {"Isebe"}, ["igs"] = {"Interglossa"}, ["igw"] = {"Igwe"}, ["ihb"] = {"Iha Based Pidgin"}, ["ihi"] = {"Ihievbe"}, ["ihp"] = {"Iha"}, ["ihw"] = {"Bidhawal"}, ["iin"] = {"Thiin"}, ["iir"] = {"Indo-Iranian languages"}, ["ijc"] = {"Izon"}, ["ije"] = {"Biseni"}, ["ijj"] = {"Ede Ije"}, ["ijn"] = {"Kalabari"}, ["ijo"] = {"Ijo languages"}, ["ijs"] = {"Southeast Ijo"}, ["ike"] = {"Eastern Canadian Inuktitut"}, ["ikh"] = {"Ikhin-Arokho"}, ["iki"] = {"Iko"}, ["ikk"] = {"Ika"}, ["ikl"] = {"Ikulu"}, ["iko"] = {"Olulumo-Ikom"}, ["ikp"] = {"Ikpeshi"}, ["ikr"] = {"Ikaranggal"}, ["iks"] = {"Inuit Sign Language"}, ["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"}, ["ikv"] = {"Iku-Gora-Ankwa"}, ["ikw"] = {"Ikwere"}, ["ikx"] = {"Ik"}, ["ikz"] = {"Ikizu"}, ["ila"] = {"Ile Ape"}, ["ilb"] = {"Ila"}, ["ilg"] = {"Garig-Ilgar"}, ["ili"] = {"Ili Turki"}, ["ilk"] = {"Ilongot"}, ["ilm"] = {"Iranun (Malaysia)"}, ["ilo"] = {"Iloko"}, ["ilp"] = {"Iranun (Philippines)"}, ["ils"] = {"International Sign"}, ["ilu"] = {"Ili'uun"}, ["ilv"] = {"Ilue"}, ["ima"] = {"Mala Malasar"}, ["imi"] = {"Anamgura"}, ["iml"] = {"Miluk"}, ["imn"] = {"Imonda"}, ["imo"] = {"Imbongu"}, ["imr"] = {"Imroing"}, ["ims"] = {"Marsian"}, ["imt"] = {"Imotong"}, ["imy"] = {"Milyan"}, ["inb"] = {"Inga"}, ["inc"] = {"Indic languages"}, ["ine"] = {"Indo-European languages"}, ["ing"] = {"Degexit'an"}, ["inh"] = {"Ingush"}, ["inj"] = {"Jungle Inga"}, ["inl"] = {"Indonesian Sign Language"}, ["inm"] = {"Minaean"}, ["inn"] = {"Isinai"}, ["ino"] = {"Inoke-Yate"}, ["inp"] = {"Iñapari"}, ["ins"] = {"Indian Sign Language"}, ["int"] = {"Intha"}, ["inz"] = {"Ineseño"}, ["ior"] = {"Inor"}, ["iou"] = {"Tuma-Irumu"}, ["iow"] = {"Iowa-Oto"}, ["ipi"] = {"Ipili"}, ["ipo"] = {"Ipiko"}, ["iqu"] = {"Iquito"}, ["iqw"] = {"Ikwo"}, ["ira"] = {"Iranian languages"}, ["ire"] = {"Iresim"}, ["irh"] = {"Irarutu"}, ["iri"] = {"Rigwe", "Irigwe"}, ["irk"] = {"Iraqw"}, ["irn"] = {"Irántxe"}, ["iro"] = {"Iroquoian languages"}, ["irr"] = {"Ir"}, ["iru"] = {"Irula"}, ["irx"] = {"Kamberau"}, ["iry"] = {"Iraya"}, ["isa"] = {"Isabi"}, ["isc"] = {"Isconahua"}, ["isd"] = {"Isnag"}, ["ise"] = {"Italian Sign Language"}, ["isg"] = {"Irish Sign Language"}, ["ish"] = {"Esan"}, ["isi"] = {"Nkem-Nkum"}, ["isk"] = {"Ishkashimi"}, ["ism"] = {"Masimasi"}, ["isn"] = {"Isanzu"}, ["iso"] = {"Isoko"}, ["isr"] = {"Israeli Sign Language"}, ["ist"] = {"Istriot"}, ["isu"] = {"Isu (Menchum Division)"}, ["itb"] = {"Binongan Itneg"}, ["itc"] = {"Italic languages"}, ["itd"] = {"Southern Tidung"}, ["ite"] = {"Itene"}, ["iti"] = {"Inlaod Itneg"}, ["itk"] = {"Judeo-Italian"}, ["itl"] = {"Itelmen"}, ["itm"] = {"Itu Mbon Uzo"}, ["ito"] = {"Itonama"}, ["itr"] = {"Iteri"}, ["its"] = {"Isekiri"}, ["itt"] = {"Maeng Itneg"}, ["itv"] = {"Itawit"}, ["itw"] = {"Ito"}, ["itx"] = {"Itik"}, ["ity"] = {"Moyadan Itneg"}, ["itz"] = {"Itzá"}, ["ium"] = {"Iu Mien"}, ["ivb"] = {"Ibatan"}, ["ivv"] = {"Ivatan"}, ["iwk"] = {"I-Wak"}, ["iwm"] = {"Iwam"}, ["iwo"] = {"Iwur"}, ["iws"] = {"Sepik Iwam"}, ["ixc"] = {"Ixcatec"}, ["ixl"] = {"Ixil"}, ["iya"] = {"Iyayu"}, ["iyo"] = {"Mesaka"}, ["iyx"] = {"Yaka (Congo)"}, ["izh"] = {"Ingrian"}, ["izm"] = {"Kizamani"}, ["izr"] = {"Izere"}, ["izz"] = {"Izii"}, ["jaa"] = {"Jamamadí"}, ["jab"] = {"Hyam"}, ["jac"] = {"Popti'", "Jakalteko"}, ["jad"] = {"Jahanka"}, ["jae"] = {"Yabem"}, ["jaf"] = {"Jara"}, ["jah"] = {"Jah Hut"}, ["jaj"] = {"Zazao"}, ["jak"] = {"Jakun"}, ["jal"] = {"Yalahatan"}, ["jam"] = {"Jamaican Creole English"}, ["jan"] = {"Jandai"}, ["jao"] = {"Yanyuwa"}, ["jaq"] = {"Yaqay"}, ["jas"] = {"New Caledonian Javanese"}, ["jat"] = {"Jakati"}, ["jau"] = {"Yaur"}, ["jax"] = {"Jambi Malay"}, ["jay"] = {"Yan-nhangu", "Nhangu"}, ["jaz"] = {"Jawe"}, ["jbe"] = {"Judeo-Berber"}, ["jbi"] = {"Badjiri"}, ["jbj"] = {"Arandai"}, ["jbk"] = {"Barikewa"}, ["jbm"] = {"Bijim"}, ["jbn"] = {"Nafusi"}, ["jbo"] = {"Lojban"}, ["jbr"] = {"Jofotek-Bromnya"}, ["jbt"] = {"Jabutí"}, ["jbu"] = {"Jukun Takum"}, ["jbw"] = {"Yawijibaya"}, ["jcs"] = {"Jamaican Country Sign Language"}, ["jct"] = {"Krymchak"}, ["jda"] = {"Jad"}, ["jdg"] = {"Jadgali"}, ["jdt"] = {"Judeo-Tat"}, ["jeb"] = {"Jebero"}, ["jee"] = {"Jerung"}, ["jeh"] = {"Jeh"}, ["jei"] = {"Yei"}, ["jek"] = {"Jeri Kuo"}, ["jel"] = {"Yelmek"}, ["jen"] = {"Dza"}, ["jer"] = {"Jere"}, ["jet"] = {"Manem"}, ["jeu"] = {"Jonkor Bourmataguil"}, ["jgb"] = {"Ngbee"}, ["jge"] = {"Judeo-Georgian"}, ["jgk"] = {"Gwak"}, ["jgo"] = {"Ngomba"}, ["jhi"] = {"Jehai"}, ["jhs"] = {"Jhankot Sign Language"}, ["jia"] = {"Jina"}, ["jib"] = {"Jibu"}, ["jic"] = {"Tol"}, ["jid"] = {"Bu (Kaduna State)"}, ["jie"] = {"Jilbe"}, ["jig"] = {"Jingulu", "Djingili"}, ["jih"] = {"sTodsde", "Shangzhai"}, ["jii"] = {"Jiiddu"}, ["jil"] = {"Jilim"}, ["jim"] = {"Jimi (Cameroon)"}, ["jio"] = {"Jiamao"}, ["jiq"] = {"Guanyinqiao", "Lavrung"}, ["jit"] = {"Jita"}, ["jiu"] = {"Youle Jinuo"}, ["jiv"] = {"Shuar"}, ["jiy"] = {"Buyuan Jinuo"}, ["jje"] = {"Jejueo"}, ["jjr"] = {"Bankal"}, ["jka"] = {"Kaera"}, ["jkm"] = {"Mobwa Karen"}, ["jko"] = {"Kubo"}, ["jkp"] = {"Paku Karen"}, ["jkr"] = {"Koro (India)"}, ["jks"] = {"Amami Koniya Sign Language"}, ["jku"] = {"Labir"}, ["jle"] = {"Ngile"}, ["jls"] = {"Jamaican Sign Language"}, ["jma"] = {"Dima"}, ["jmb"] = {"Zumbun"}, ["jmc"] = {"Machame"}, ["jmd"] = {"Yamdena"}, ["jmi"] = {"Jimi (Nigeria)"}, ["jml"] = {"Jumli"}, ["jmn"] = {"Makuri Naga"}, ["jmr"] = {"Kamara"}, ["jms"] = {"Mashi (Nigeria)"}, ["jmw"] = {"Mouwase"}, ["jmx"] = {"Western Juxtlahuaca Mixtec"}, ["jna"] = {"Jangshung"}, ["jnd"] = {"Jandavra"}, ["jng"] = {"Yangman"}, ["jni"] = {"Janji"}, ["jnj"] = {"Yemsa"}, ["jnl"] = {"Rawat"}, ["jns"] = {"Jaunsari"}, ["job"] = {"Joba"}, ["jod"] = {"Wojenaka"}, ["jog"] = {"Jogi"}, ["jor"] = {"Jorá"}, ["jos"] = {"Jordanian Sign Language"}, ["jow"] = {"Jowulu"}, ["jpa"] = {"Jewish Palestinian Aramaic"}, ["jpr"] = {"Judeo-Persian"}, ["jpx"] = {"Japanese (family)"}, ["jqr"] = {"Jaqaru"}, ["jra"] = {"Jarai"}, ["jrb"] = {"Judeo-Arabic"}, ["jrr"] = {"Jiru"}, ["jrt"] = {"Jakattoe"}, ["jru"] = {"Japrería"}, ["jsl"] = {"Japanese Sign Language"}, ["jua"] = {"Júma"}, ["jub"] = {"Wannu"}, ["juc"] = {"Jurchen"}, ["jud"] = {"Worodougou"}, ["juh"] = {"Hõne"}, ["jui"] = {"Ngadjuri"}, ["juk"] = {"Wapan"}, ["jul"] = {"Jirel"}, ["jum"] = {"Jumjum"}, ["jun"] = {"Juang"}, ["juo"] = {"Jiba"}, ["jup"] = {"Hupdë"}, ["jur"] = {"Jurúna"}, ["jus"] = {"Jumla Sign Language"}, ["jut"] = {"Jutish"}, ["juu"] = {"Ju"}, ["juw"] = {"Wãpha"}, ["juy"] = {"Juray"}, ["jvd"] = {"Javindo"}, ["jvn"] = {"Caribbean Javanese"}, ["jwi"] = {"Jwira-Pepesa"}, ["jya"] = {"Jiarong"}, ["jye"] = {"Judeo-Yemeni Arabic"}, ["jyy"] = {"Jaya"}, ["kaa"] = {"Kara-Kalpak", "Karakalpak"}, ["kab"] = {"Kabyle"}, ["kac"] = {"Kachin", "Jingpho"}, ["kad"] = {"Adara"}, ["kae"] = {"Ketangalan"}, ["kaf"] = {"Katso"}, ["kag"] = {"Kajaman"}, ["kah"] = {"Kara (Central African Republic)"}, ["kai"] = {"Karekare"}, ["kaj"] = {"Jju"}, ["kak"] = {"Kalanguya", "Kayapa Kallahan"}, ["kam"] = {"Kamba (Kenya)"}, ["kao"] = {"Xaasongaxango"}, ["kap"] = {"Bezhta"}, ["kaq"] = {"Capanahua"}, ["kar"] = {"Karen languages"}, ["kav"] = {"Katukína"}, ["kaw"] = {"Kawi"}, ["kax"] = {"Kao"}, ["kay"] = {"Kamayurá"}, ["kba"] = {"Kalarko"}, ["kbb"] = {"Kaxuiâna"}, ["kbc"] = {"Kadiwéu"}, ["kbd"] = {"Kabardian"}, ["kbe"] = {"Kanju"}, ["kbg"] = {"Khamba"}, ["kbh"] = {"Camsá"}, ["kbi"] = {"Kaptiau"}, ["kbj"] = {"Kari"}, ["kbk"] = {"Grass Koiari"}, ["kbl"] = {"Kanembu"}, ["kbm"] = {"Iwal"}, ["kbn"] = {"Kare (Central African Republic)"}, ["kbo"] = {"Keliko"}, ["kbp"] = {"Kabiyè"}, ["kbq"] = {"Kamano"}, ["kbr"] = {"Kafa"}, ["kbs"] = {"Kande"}, ["kbt"] = {"Abadi"}, ["kbu"] = {"Kabutra"}, ["kbv"] = {"Dera (Indonesia)"}, ["kbw"] = {"Kaiep"}, ["kbx"] = {"Ap Ma"}, ["kby"] = {"Manga Kanuri"}, ["kbz"] = {"Duhwa"}, ["kca"] = {"Khanty"}, ["kcb"] = {"Kawacha"}, ["kcc"] = {"Lubila"}, ["kcd"] = {"Ngkâlmpw Kanum"}, ["kce"] = {"Kaivi"}, ["kcf"] = {"Ukaan"}, ["kcg"] = {"Tyap"}, ["kch"] = {"Vono"}, ["kci"] = {"Kamantan"}, ["kcj"] = {"Kobiana"}, ["kck"] = {"Kalanga"}, ["kcl"] = {"Kela (Papua New Guinea)", "Kala"}, ["kcm"] = {"Gula (Central African Republic)"}, ["kcn"] = {"Nubi"}, ["kco"] = {"Kinalakna"}, ["kcp"] = {"Kanga"}, ["kcq"] = {"Kamo"}, ["kcr"] = {"Katla"}, ["kcs"] = {"Koenoem"}, ["kct"] = {"Kaian"}, ["kcu"] = {"Kami (Tanzania)"}, ["kcv"] = {"Kete"}, ["kcw"] = {"Kabwari"}, ["kcx"] = {"Kachama-Ganjule"}, ["kcy"] = {"Korandje"}, ["kcz"] = {"Konongo"}, ["kda"] = {"Worimi"}, ["kdc"] = {"Kutu"}, ["kdd"] = {"Yankunytjatjara"}, ["kde"] = {"Makonde"}, ["kdf"] = {"Mamusi"}, ["kdg"] = {"Seba"}, ["kdh"] = {"Tem"}, ["kdi"] = {"Kumam"}, ["kdj"] = {"Karamojong"}, ["kdk"] = {"Numèè", "Kwényi"}, ["kdl"] = {"Tsikimba"}, ["kdm"] = {"Kagoma"}, ["kdn"] = {"Kunda"}, ["kdo"] = {"Kordofanian languages"}, ["kdp"] = {"Kaningdon-Nindem"}, ["kdq"] = {"Koch"}, ["kdr"] = {"Karaim"}, ["kdt"] = {"Kuy"}, ["kdu"] = {"Kadaru"}, ["kdw"] = {"Koneraw"}, ["kdx"] = {"Kam"}, ["kdy"] = {"Keder", "Keijar"}, ["kdz"] = {"Kwaja"}, ["kea"] = {"Kabuverdianu"}, ["keb"] = {"Kélé"}, ["kec"] = {"Keiga"}, ["ked"] = {"Kerewe"}, ["kee"] = {"Eastern Keres"}, ["kef"] = {"Kpessi"}, ["keg"] = {"Tese"}, ["keh"] = {"Keak"}, ["kei"] = {"Kei"}, ["kej"] = {"Kadar"}, ["kek"] = {"Kekchí"}, ["kel"] = {"Kela (Democratic Republic of Congo)"}, ["kem"] = {"Kemak"}, ["ken"] = {"Kenyang"}, ["keo"] = {"Kakwa"}, ["kep"] = {"Kaikadi"}, ["keq"] = {"Kamar"}, ["ker"] = {"Kera"}, ["kes"] = {"Kugbo"}, ["ket"] = {"Ket"}, ["keu"] = {"Akebu"}, ["kev"] = {"Kanikkaran"}, ["kew"] = {"West Kewa"}, ["kex"] = {"Kukna"}, ["key"] = {"Kupia"}, ["kez"] = {"Kukele"}, ["kfa"] = {"Kodava"}, ["kfb"] = {"Northwestern Kolami"}, ["kfc"] = {"Konda-Dora"}, ["kfd"] = {"Korra Koraga"}, ["kfe"] = {"Kota (India)"}, ["kff"] = {"Koya"}, ["kfg"] = {"Kudiya"}, ["kfh"] = {"Kurichiya"}, ["kfi"] = {"Kannada Kurumba"}, ["kfj"] = {"Kemiehua"}, ["kfk"] = {"Kinnauri"}, ["kfl"] = {"Kung"}, ["kfm"] = {"Khunsari"}, ["kfn"] = {"Kuk"}, ["kfo"] = {"Koro (Côte d'Ivoire)"}, ["kfp"] = {"Korwa"}, ["kfq"] = {"Korku"}, ["kfr"] = {"Kachhi", "Kutchi"}, ["kfs"] = {"Bilaspuri"}, ["kft"] = {"Kanjari"}, ["kfu"] = {"Katkari"}, ["kfv"] = {"Kurmukar"}, ["kfw"] = {"Kharam Naga"}, ["kfx"] = {"Kullu Pahari"}, ["kfy"] = {"Kumaoni"}, ["kfz"] = {"Koromfé"}, ["kga"] = {"Koyaga"}, ["kgb"] = {"Kawe"}, ["kge"] = {"Komering"}, ["kgf"] = {"Kube"}, ["kgg"] = {"Kusunda"}, ["kgi"] = {"Selangor Sign Language"}, ["kgj"] = {"Gamale Kham"}, ["kgk"] = {"Kaiwá"}, ["kgl"] = {"Kunggari"}, ["kgn"] = {"Karingani"}, ["kgo"] = {"Krongo"}, ["kgp"] = {"Kaingang"}, ["kgq"] = {"Kamoro"}, ["kgr"] = {"Abun"}, ["kgs"] = {"Kumbainggar"}, ["kgt"] = {"Somyev"}, ["kgu"] = {"Kobol"}, ["kgv"] = {"Karas"}, ["kgw"] = {"Karon Dori"}, ["kgx"] = {"Kamaru"}, ["kgy"] = {"Kyerung"}, ["kha"] = {"Khasi"}, ["khb"] = {"Lü"}, ["khc"] = {"Tukang Besi North"}, ["khd"] = {"Bädi Kanum"}, ["khe"] = {"Korowai"}, ["khf"] = {"Khuen"}, ["khg"] = {"Khams Tibetan"}, ["khh"] = {"Kehu"}, ["khi"] = {"Khoisan languages"}, ["khj"] = {"Kuturmi"}, ["khk"] = {"Halh Mongolian"}, ["khl"] = {"Lusi"}, ["khn"] = {"Khandesi"}, ["kho"] = {"Khotanese", "Sakan"}, ["khp"] = {"Kapori", "Kapauri"}, ["khq"] = {"Koyra Chiini Songhay"}, ["khr"] = {"Kharia"}, ["khs"] = {"Kasua"}, ["kht"] = {"Khamti"}, ["khu"] = {"Nkhumbi"}, ["khv"] = {"Khvarshi"}, ["khw"] = {"Khowar"}, ["khx"] = {"Kanu"}, ["khy"] = {"Kele (Democratic Republic of Congo)"}, ["khz"] = {"Keapara"}, ["kia"] = {"Kim"}, ["kib"] = {"Koalib"}, ["kic"] = {"Kickapoo"}, ["kid"] = {"Koshin"}, ["kie"] = {"Kibet"}, ["kif"] = {"Eastern Parbate Kham"}, ["kig"] = {"Kimaama", "Kimaghima"}, ["kih"] = {"Kilmeri"}, ["kii"] = {"Kitsai"}, ["kij"] = {"Kilivila"}, ["kil"] = {"Kariya"}, ["kim"] = {"Karagas"}, ["kio"] = {"Kiowa"}, ["kip"] = {"Sheshi Kham"}, ["kiq"] = {"Kosadle", "Kosare"}, ["kis"] = {"Kis"}, ["kit"] = {"Agob"}, ["kiu"] = {"Kirmanjki (individual language)"}, ["kiv"] = {"Kimbu"}, ["kiw"] = {"Northeast Kiwai"}, ["kix"] = {"Khiamniungan Naga"}, ["kiy"] = {"Kirikiri"}, ["kiz"] = {"Kisi"}, ["kja"] = {"Mlap"}, ["kjb"] = {"Q'anjob'al", "Kanjobal"}, ["kjc"] = {"Coastal Konjo"}, ["kjd"] = {"Southern Kiwai"}, ["kje"] = {"Kisar"}, ["kjg"] = {"Khmu"}, ["kjh"] = {"Khakas"}, ["kji"] = {"Zabana"}, ["kjj"] = {"Khinalugh"}, ["kjk"] = {"Highland Konjo"}, ["kjl"] = {"Western Parbate Kham"}, ["kjm"] = {"Kháng"}, ["kjn"] = {"Kunjen"}, ["kjo"] = {"Harijan Kinnauri"}, ["kjp"] = {"Pwo Eastern Karen"}, ["kjq"] = {"Western Keres"}, ["kjr"] = {"Kurudu"}, ["kjs"] = {"East Kewa"}, ["kjt"] = {"Phrae Pwo Karen"}, ["kju"] = {"Kashaya"}, ["kjv"] = {"Kaikavian Literary Language"}, ["kjx"] = {"Ramopa"}, ["kjy"] = {"Erave"}, ["kjz"] = {"Bumthangkha"}, ["kka"] = {"Kakanda"}, ["kkb"] = {"Kwerisa"}, ["kkc"] = {"Odoodee"}, ["kkd"] = {"Kinuku"}, ["kke"] = {"Kakabe"}, ["kkf"] = {"Kalaktang Monpa"}, ["kkg"] = {"Mabaka Valley Kalinga"}, ["kkh"] = {"Khün"}, ["kki"] = {"Kagulu"}, ["kkj"] = {"Kako"}, ["kkk"] = {"Kokota"}, ["kkl"] = {"Kosarek Yale"}, ["kkm"] = {"Kiong"}, ["kkn"] = {"Kon Keu"}, ["kko"] = {"Karko"}, ["kkp"] = {"Gugubera", "Koko-Bera"}, ["kkq"] = {"Kaeku"}, ["kkr"] = {"Kir-Balar"}, ["kks"] = {"Giiwo"}, ["kkt"] = {"Koi"}, ["kku"] = {"Tumi"}, ["kkv"] = {"Kangean"}, ["kkw"] = {"Teke-Kukuya"}, ["kkx"] = {"Kohin"}, ["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"}, ["kkz"] = {"Kaska"}, ["kla"] = {"Klamath-Modoc"}, ["klb"] = {"Kiliwa"}, ["klc"] = {"Kolbila"}, ["kld"] = {"Gamilaraay"}, ["kle"] = {"Kulung (Nepal)"}, ["klf"] = {"Kendeje"}, ["klg"] = {"Tagakaulo"}, ["klh"] = {"Weliki"}, ["kli"] = {"Kalumpang"}, ["klj"] = {"Khalaj"}, ["klk"] = {"Kono (Nigeria)"}, ["kll"] = {"Kagan Kalagan"}, ["klm"] = {"Migum"}, ["kln"] = {"Kalenjin"}, ["klo"] = {"Kapya"}, ["klp"] = {"Kamasa"}, ["klq"] = {"Rumu"}, ["klr"] = {"Khaling"}, ["kls"] = {"Kalasha"}, ["klt"] = {"Nukna"}, ["klu"] = {"Klao"}, ["klv"] = {"Maskelynes"}, ["klw"] = {"Tado", "Lindu"}, ["klx"] = {"Koluwawa"}, ["kly"] = {"Kalao"}, ["klz"] = {"Kabola"}, ["kma"] = {"Konni"}, ["kmb"] = {"Kimbundu"}, ["kmc"] = {"Southern Dong"}, ["kmd"] = {"Majukayang Kalinga"}, ["kme"] = {"Bakole"}, ["kmf"] = {"Kare (Papua New Guinea)"}, ["kmg"] = {"Kâte"}, ["kmh"] = {"Kalam"}, ["kmi"] = {"Kami (Nigeria)"}, ["kmj"] = {"Kumarbhag Paharia"}, ["kmk"] = {"Limos Kalinga"}, ["kml"] = {"Tanudan Kalinga"}, ["kmm"] = {"Kom (India)"}, ["kmn"] = {"Awtuw"}, ["kmo"] = {"Kwoma"}, ["kmp"] = {"Gimme"}, ["kmq"] = {"Kwama"}, ["kmr"] = {"Northern Kurdish"}, ["kms"] = {"Kamasau"}, ["kmt"] = {"Kemtuik"}, ["kmu"] = {"Kanite"}, ["kmv"] = {"Karipúna Creole French"}, ["kmw"] = {"Komo (Democratic Republic of Congo)"}, ["kmx"] = {"Waboda"}, ["kmy"] = {"Koma"}, ["kmz"] = {"Khorasani Turkish"}, ["kna"] = {"Dera (Nigeria)"}, ["knb"] = {"Lubuagan Kalinga"}, ["knc"] = {"Central Kanuri"}, ["knd"] = {"Konda"}, ["kne"] = {"Kankanaey"}, ["knf"] = {"Mankanya"}, ["kng"] = {"Koongo"}, ["kni"] = {"Kanufi"}, ["knj"] = {"Western Kanjobal"}, ["knk"] = {"Kuranko"}, ["knl"] = {"Keninjal"}, ["knm"] = {"Kanamarí"}, ["knn"] = {"Konkani (individual language)"}, ["kno"] = {"Kono (Sierra Leone)"}, ["knp"] = {"Kwanja"}, ["knq"] = {"Kintaq"}, ["knr"] = {"Kaningra"}, ["kns"] = {"Kensiu"}, ["knt"] = {"Panoan Katukína"}, ["knu"] = {"Kono (Guinea)"}, ["knv"] = {"Tabo"}, ["knw"] = {"Kung-Ekoka"}, ["knx"] = {"Kendayan", "Salako"}, ["kny"] = {"Kanyok"}, ["knz"] = {"Kalamsé"}, ["koa"] = {"Konomala"}, ["koc"] = {"Kpati"}, ["kod"] = {"Kodi"}, ["koe"] = {"Kacipo-Bale Suri"}, ["kof"] = {"Kubi"}, ["kog"] = {"Cogui", "Kogi"}, ["koh"] = {"Koyo"}, ["koi"] = {"Komi-Permyak"}, ["kok"] = {"Konkani (macrolanguage)"}, ["kol"] = {"Kol (Papua New Guinea)"}, ["koo"] = {"Konzo"}, ["kop"] = {"Waube"}, ["koq"] = {"Kota (Gabon)"}, ["kos"] = {"Kosraean"}, ["kot"] = {"Lagwan"}, ["kou"] = {"Koke"}, ["kov"] = {"Kudu-Camo"}, ["kow"] = {"Kugama"}, ["koy"] = {"Koyukon"}, ["koz"] = {"Korak"}, ["kpa"] = {"Kutto"}, ["kpb"] = {"Mullu Kurumba"}, ["kpc"] = {"Curripaco"}, ["kpd"] = {"Koba"}, ["kpe"] = {"Kpelle"}, ["kpf"] = {"Komba"}, ["kpg"] = {"Kapingamarangi"}, ["kph"] = {"Kplang"}, ["kpi"] = {"Kofei"}, ["kpj"] = {"Karajá"}, ["kpk"] = {"Kpan"}, ["kpl"] = {"Kpala"}, ["kpm"] = {"Koho"}, ["kpn"] = {"Kepkiriwát"}, ["kpo"] = {"Ikposo"}, ["kpq"] = {"Korupun-Sela"}, ["kpr"] = {"Korafe-Yegha"}, ["kps"] = {"Tehit"}, ["kpt"] = {"Karata"}, ["kpu"] = {"Kafoa"}, ["kpv"] = {"Komi-Zyrian"}, ["kpw"] = {"Kobon"}, ["kpx"] = {"Mountain Koiali"}, ["kpy"] = {"Koryak"}, ["kpz"] = {"Kupsabiny"}, ["kqa"] = {"Mum"}, ["kqb"] = {"Kovai"}, ["kqc"] = {"Doromu-Koki"}, ["kqd"] = {"Koy Sanjaq Surat"}, ["kqe"] = {"Kalagan"}, ["kqf"] = {"Kakabai"}, ["kqg"] = {"Khe"}, ["kqh"] = {"Kisankasa"}, ["kqi"] = {"Koitabu"}, ["kqj"] = {"Koromira"}, ["kqk"] = {"Kotafon Gbe"}, ["kql"] = {"Kyenele"}, ["kqm"] = {"Khisa"}, ["kqn"] = {"Kaonde"}, ["kqo"] = {"Eastern Krahn"}, ["kqp"] = {"Kimré"}, ["kqq"] = {"Krenak"}, ["kqr"] = {"Kimaragang"}, ["kqs"] = {"Northern Kissi"}, ["kqt"] = {"Klias River Kadazan"}, ["kqu"] = {"Seroa"}, ["kqv"] = {"Okolod"}, ["kqw"] = {"Kandas"}, ["kqx"] = {"Mser"}, ["kqy"] = {"Koorete"}, ["kqz"] = {"Korana"}, ["kra"] = {"Kumhali"}, ["krb"] = {"Karkin"}, ["krc"] = {"Karachay-Balkar"}, ["krd"] = {"Kairui-Midiki"}, ["kre"] = {"Panará"}, ["krf"] = {"Koro (Vanuatu)"}, ["krh"] = {"Kurama"}, ["kri"] = {"Krio"}, ["krj"] = {"Kinaray-A"}, ["krk"] = {"Kerek"}, ["krl"] = {"Karelian"}, ["krn"] = {"Sapo"}, ["kro"] = {"Kru languages"}, ["krp"] = {"Durop"}, ["krr"] = {"Krung"}, ["krs"] = {"Gbaya (Sudan)"}, ["krt"] = {"Tumari Kanuri"}, ["kru"] = {"Kurukh"}, ["krv"] = {"Kavet"}, ["krw"] = {"Western Krahn"}, ["krx"] = {"Karon"}, ["kry"] = {"Kryts"}, ["krz"] = {"Sota Kanum"}, ["ksb"] = {"Shambala"}, ["ksc"] = {"Southern Kalinga"}, ["ksd"] = {"Kuanua"}, ["kse"] = {"Kuni"}, ["ksf"] = {"Bafia"}, ["ksg"] = {"Kusaghe"}, ["ksh"] = {"Kölsch"}, ["ksi"] = {"Krisa", "I'saka"}, ["ksj"] = {"Uare"}, ["ksk"] = {"Kansa"}, ["ksl"] = {"Kumalu"}, ["ksm"] = {"Kumba"}, ["ksn"] = {"Kasiguranin"}, ["kso"] = {"Kofa"}, ["ksp"] = {"Kaba"}, ["ksq"] = {"Kwaami"}, ["ksr"] = {"Borong"}, ["kss"] = {"Southern Kisi"}, ["kst"] = {"Winyé"}, ["ksu"] = {"Khamyang"}, ["ksv"] = {"Kusu"}, ["ksw"] = {"S'gaw Karen"}, ["ksx"] = {"Kedang"}, ["ksy"] = {"Kharia Thar"}, ["ksz"] = {"Kodaku"}, ["kta"] = {"Katua"}, ["ktb"] = {"Kambaata"}, ["ktc"] = {"Kholok"}, ["ktd"] = {"Kokata", "Kukatha"}, ["kte"] = {"Nubri"}, ["ktf"] = {"Kwami"}, ["ktg"] = {"Kalkutung"}, ["kth"] = {"Karanga"}, ["kti"] = {"North Muyu"}, ["ktj"] = {"Plapo Krumen"}, ["ktk"] = {"Kaniet"}, ["ktl"] = {"Koroshi"}, ["ktm"] = {"Kurti"}, ["ktn"] = {"Karitiâna"}, ["kto"] = {"Kuot"}, ["ktp"] = {"Kaduo"}, ["ktq"] = {"Katabaga"}, ["kts"] = {"South Muyu"}, ["ktt"] = {"Ketum"}, ["ktu"] = {"Kituba (Democratic Republic of Congo)"}, ["ktv"] = {"Eastern Katu"}, ["ktw"] = {"Kato"}, ["ktx"] = {"Kaxararí"}, ["kty"] = {"Kango (Bas-Uélé District)"}, ["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"}, ["kub"] = {"Kutep"}, ["kuc"] = {"Kwinsu"}, ["kud"] = {"'Auhelawa"}, ["kue"] = {"Kuman (Papua New Guinea)"}, ["kuf"] = {"Western Katu"}, ["kug"] = {"Kupa"}, ["kuh"] = {"Kushi"}, ["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"}, ["kuj"] = {"Kuria"}, ["kuk"] = {"Kepo'"}, ["kul"] = {"Kulere"}, ["kum"] = {"Kumyk"}, ["kun"] = {"Kunama"}, ["kuo"] = {"Kumukio"}, ["kup"] = {"Kunimaipa"}, ["kuq"] = {"Karipuna"}, ["kus"] = {"Kusaal"}, ["kut"] = {"Kutenai"}, ["kuu"] = {"Upper Kuskokwim"}, ["kuv"] = {"Kur"}, ["kuw"] = {"Kpagua"}, ["kux"] = {"Kukatja"}, ["kuy"] = {"Kuuku-Ya'u"}, ["kuz"] = {"Kunza"}, ["kva"] = {"Bagvalal"}, ["kvb"] = {"Kubu"}, ["kvc"] = {"Kove"}, ["kvd"] = {"Kui (Indonesia)"}, ["kve"] = {"Kalabakan"}, ["kvf"] = {"Kabalai"}, ["kvg"] = {"Kuni-Boazi"}, ["kvh"] = {"Komodo"}, ["kvi"] = {"Kwang"}, ["kvj"] = {"Psikye"}, ["kvk"] = {"Korean Sign Language"}, ["kvl"] = {"Kayaw"}, ["kvm"] = {"Kendem"}, ["kvn"] = {"Border Kuna"}, ["kvo"] = {"Dobel"}, ["kvp"] = {"Kompane"}, ["kvq"] = {"Geba Karen"}, ["kvr"] = {"Kerinci"}, ["kvt"] = {"Lahta Karen", "Lahta"}, ["kvu"] = {"Yinbaw Karen"}, ["kvv"] = {"Kola"}, ["kvw"] = {"Wersing"}, ["kvx"] = {"Parkari Koli"}, ["kvy"] = {"Yintale Karen", "Yintale"}, ["kvz"] = {"Tsakwambo", "Tsaukambo"}, ["kwa"] = {"Dâw"}, ["kwb"] = {"Kwa"}, ["kwc"] = {"Likwala"}, ["kwd"] = {"Kwaio"}, ["kwe"] = {"Kwerba"}, ["kwf"] = {"Kwara'ae"}, ["kwg"] = {"Sara Kaba Deme"}, ["kwh"] = {"Kowiai"}, ["kwi"] = {"Awa-Cuaiquer"}, ["kwj"] = {"Kwanga"}, ["kwk"] = {"Kwakiutl"}, ["kwl"] = {"Kofyar"}, ["kwm"] = {"Kwambi"}, ["kwn"] = {"Kwangali"}, ["kwo"] = {"Kwomtari"}, ["kwp"] = {"Kodia"}, ["kwr"] = {"Kwer"}, ["kws"] = {"Kwese"}, ["kwt"] = {"Kwesten"}, ["kwu"] = {"Kwakum"}, ["kwv"] = {"Sara Kaba Náà"}, ["kww"] = {"Kwinti"}, ["kwx"] = {"Khirwar"}, ["kwy"] = {"San Salvador Kongo"}, ["kwz"] = {"Kwadi"}, ["kxa"] = {"Kairiru"}, ["kxb"] = {"Krobu"}, ["kxc"] = {"Konso", "Khonso"}, ["kxd"] = {"Brunei"}, ["kxf"] = {"Manumanaw Karen", "Manumanaw"}, ["kxh"] = {"Karo (Ethiopia)"}, ["kxi"] = {"Keningau Murut"}, ["kxj"] = {"Kulfa"}, ["kxk"] = {"Zayein Karen"}, ["kxm"] = {"Northern Khmer"}, ["kxn"] = {"Kanowit-Tanjong Melanau"}, ["kxo"] = {"Kanoé"}, ["kxp"] = {"Wadiyara Koli"}, ["kxq"] = {"Smärky Kanum"}, ["kxr"] = {"Koro (Papua New Guinea)"}, ["kxs"] = {"Kangjia"}, ["kxt"] = {"Koiwat"}, ["kxv"] = {"Kuvi"}, ["kxw"] = {"Konai"}, ["kxx"] = {"Likuba"}, ["kxy"] = {"Kayong"}, ["kxz"] = {"Kerewo"}, ["kya"] = {"Kwaya"}, ["kyb"] = {"Butbut Kalinga"}, ["kyc"] = {"Kyaka"}, ["kyd"] = {"Karey"}, ["kye"] = {"Krache"}, ["kyf"] = {"Kouya"}, ["kyg"] = {"Keyagana"}, ["kyh"] = {"Karok"}, ["kyi"] = {"Kiput"}, ["kyj"] = {"Karao"}, ["kyk"] = {"Kamayo"}, ["kyl"] = {"Kalapuya"}, ["kym"] = {"Kpatili"}, ["kyn"] = {"Northern Binukidnon"}, ["kyo"] = {"Kelon"}, ["kyp"] = {"Kang"}, ["kyq"] = {"Kenga"}, ["kyr"] = {"Kuruáya"}, ["kys"] = {"Baram Kayan"}, ["kyt"] = {"Kayagar"}, ["kyu"] = {"Western Kayah"}, ["kyv"] = {"Kayort"}, ["kyw"] = {"Kudmali"}, ["kyx"] = {"Rapoisi"}, ["kyy"] = {"Kambaira"}, ["kyz"] = {"Kayabí"}, ["kza"] = {"Western Karaboro"}, ["kzb"] = {"Kaibobo"}, ["kzc"] = {"Bondoukou Kulango"}, ["kzd"] = {"Kadai"}, ["kze"] = {"Kosena"}, ["kzf"] = {"Da'a Kaili"}, ["kzg"] = {"Kikai"}, ["kzi"] = {"Kelabit"}, ["kzk"] = {"Kazukuru"}, ["kzl"] = {"Kayeli"}, ["kzm"] = {"Kais"}, ["kzn"] = {"Kokola"}, ["kzo"] = {"Kaningi"}, ["kzp"] = {"Kaidipang"}, ["kzq"] = {"Kaike"}, ["kzr"] = {"Karang"}, ["kzs"] = {"Sugut Dusun"}, ["kzu"] = {"Kayupulau"}, ["kzv"] = {"Komyandaret"}, ["kzw"] = {"Karirí-Xocó"}, ["kzx"] = {"Kamarian"}, ["kzy"] = {"Kango (Tshopo District)"}, ["kzz"] = {"Kalabra"}, ["laa"] = {"Southern Subanen"}, ["lab"] = {"Linear A"}, ["lac"] = {"Lacandon"}, ["lad"] = {"Ladino"}, ["lae"] = {"Pattani"}, ["laf"] = {"Lafofa"}, ["lag"] = {"Rangi"}, ["lah"] = {"Lahnda"}, ["lai"] = {"Lambya"}, ["laj"] = {"Lango (Uganda)"}, ["lal"] = {"Lalia"}, ["lam"] = {"Lamba"}, ["lan"] = {"Laru"}, ["lap"] = {"Laka (Chad)"}, ["laq"] = {"Qabiao"}, ["lar"] = {"Larteh"}, ["las"] = {"Lama (Togo)"}, ["lau"] = {"Laba"}, ["law"] = {"Lauje"}, ["lax"] = {"Tiwa"}, ["lay"] = {"Lama Bai"}, ["laz"] = {"Aribwatsa"}, ["lbb"] = {"Label"}, ["lbc"] = {"Lakkia"}, ["lbe"] = {"Lak"}, ["lbf"] = {"Tinani"}, ["lbg"] = {"Laopang"}, ["lbi"] = {"La'bi"}, ["lbj"] = {"Ladakhi"}, ["lbk"] = {"Central Bontok"}, ["lbl"] = {"Libon Bikol"}, ["lbm"] = {"Lodhi"}, ["lbn"] = {"Rmeet"}, ["lbo"] = {"Laven"}, ["lbq"] = {"Wampar"}, ["lbr"] = {"Lohorung"}, ["lbs"] = {"Libyan Sign Language"}, ["lbt"] = {"Lachi"}, ["lbu"] = {"Labu"}, ["lbv"] = {"Lavatbura-Lamusong"}, ["lbw"] = {"Tolaki"}, ["lbx"] = {"Lawangan"}, ["lby"] = {"Lamalama", "Lamu-Lamu"}, ["lbz"] = {"Lardil"}, ["lcc"] = {"Legenyem"}, ["lcd"] = {"Lola"}, ["lce"] = {"Loncong", "Sekak"}, ["lcf"] = {"Lubu"}, ["lch"] = {"Luchazi"}, ["lcl"] = {"Lisela"}, ["lcm"] = {"Tungag"}, ["lcp"] = {"Western Lawa"}, ["lcq"] = {"Luhu"}, ["lcs"] = {"Lisabata-Nuniali"}, ["lda"] = {"Kla-Dan"}, ["ldb"] = {"Dũya"}, ["ldd"] = {"Luri"}, ["ldg"] = {"Lenyima"}, ["ldh"] = {"Lamja-Dengsa-Tola"}, ["ldi"] = {"Laari"}, ["ldj"] = {"Lemoro"}, ["ldk"] = {"Leelau"}, ["ldl"] = {"Kaan"}, ["ldm"] = {"Landoma"}, ["ldn"] = {"Láadan"}, ["ldo"] = {"Loo"}, ["ldp"] = {"Tso"}, ["ldq"] = {"Lufu"}, ["lea"] = {"Lega-Shabunda"}, ["leb"] = {"Lala-Bisa"}, ["lec"] = {"Leco"}, ["led"] = {"Lendu"}, ["lee"] = {"Lyélé"}, ["lef"] = {"Lelemi"}, ["leh"] = {"Lenje"}, ["lei"] = {"Lemio"}, ["lej"] = {"Lengola"}, ["lek"] = {"Leipon"}, ["lel"] = {"Lele (Democratic Republic of Congo)"}, ["lem"] = {"Nomaande"}, ["len"] = {"Lenca"}, ["leo"] = {"Leti (Cameroon)"}, ["lep"] = {"Lepcha"}, ["leq"] = {"Lembena"}, ["ler"] = {"Lenkau"}, ["les"] = {"Lese"}, ["let"] = {"Lesing-Gelimi", "Amio-Gelimi"}, ["leu"] = {"Kara (Papua New Guinea)"}, ["lev"] = {"Lamma"}, ["lew"] = {"Ledo Kaili"}, ["lex"] = {"Luang"}, ["ley"] = {"Lemolang"}, ["lez"] = {"Lezghian"}, ["lfa"] = {"Lefa"}, ["lfn"] = {"Lingua Franca Nova"}, ["lga"] = {"Lungga"}, ["lgb"] = {"Laghu"}, ["lgg"] = {"Lugbara"}, ["lgh"] = {"Laghuu"}, ["lgi"] = {"Lengilu"}, ["lgk"] = {"Lingarak", "Neverver"}, ["lgl"] = {"Wala"}, ["lgm"] = {"Lega-Mwenga"}, ["lgn"] = {"T'apo", "Opuuo"}, ["lgo"] = {"Lango (South Sudan)"}, ["lgq"] = {"Logba"}, ["lgr"] = {"Lengo"}, ["lgs"] = {"Guinea-Bissau Sign Language", "Língua Gestual Guineense"}, ["lgt"] = {"Pahi"}, ["lgu"] = {"Longgu"}, ["lgz"] = {"Ligenza"}, ["lha"] = {"Laha (Viet Nam)"}, ["lhh"] = {"Laha (Indonesia)"}, ["lhi"] = {"Lahu Shi"}, ["lhl"] = {"Lahul Lohar"}, ["lhm"] = {"Lhomi"}, ["lhn"] = {"Lahanan"}, ["lhp"] = {"Lhokpu"}, ["lhs"] = {"Mlahsö"}, ["lht"] = {"Lo-Toga"}, ["lhu"] = {"Lahu"}, ["lia"] = {"West-Central Limba"}, ["lib"] = {"Likum"}, ["lic"] = {"Hlai"}, ["lid"] = {"Nyindrou"}, ["lie"] = {"Likila"}, ["lif"] = {"Limbu"}, ["lig"] = {"Ligbi"}, ["lih"] = {"Lihir"}, ["lij"] = {"Ligurian"}, ["lik"] = {"Lika"}, ["lil"] = {"Lillooet"}, ["lio"] = {"Liki"}, ["lip"] = {"Sekpele"}, ["liq"] = {"Libido"}, ["lir"] = {"Liberian English"}, ["lis"] = {"Lisu"}, ["liu"] = {"Logorik"}, ["liv"] = {"Liv"}, ["liw"] = {"Col"}, ["lix"] = {"Liabuku"}, ["liy"] = {"Banda-Bambari"}, ["liz"] = {"Libinza"}, ["lja"] = {"Golpa"}, ["lje"] = {"Rampi"}, ["lji"] = {"Laiyolo"}, ["ljl"] = {"Li'o"}, ["ljp"] = {"Lampung Api"}, ["ljw"] = {"Yirandali"}, ["ljx"] = {"Yuru"}, ["lka"] = {"Lakalei"}, ["lkb"] = {"Kabras", "Lukabaras"}, ["lkc"] = {"Kucong"}, ["lkd"] = {"Lakondê"}, ["lke"] = {"Kenyi"}, ["lkh"] = {"Lakha"}, ["lki"] = {"Laki"}, ["lkj"] = {"Remun"}, ["lkl"] = {"Laeko-Libuat"}, ["lkm"] = {"Kalaamaya"}, ["lkn"] = {"Lakon", "Vure"}, ["lko"] = {"Khayo", "Olukhayo"}, ["lkr"] = {"Päri"}, ["lks"] = {"Kisa", "Olushisa"}, ["lkt"] = {"Lakota"}, ["lku"] = {"Kungkari"}, ["lky"] = {"Lokoya"}, ["lla"] = {"Lala-Roba"}, ["llb"] = {"Lolo"}, ["llc"] = {"Lele (Guinea)"}, ["lld"] = {"Ladin"}, ["lle"] = {"Lele (Papua New Guinea)"}, ["llf"] = {"Hermit"}, ["llg"] = {"Lole"}, ["llh"] = {"Lamu"}, ["lli"] = {"Teke-Laali"}, ["llj"] = {"Ladji Ladji"}, ["llk"] = {"Lelak"}, ["lll"] = {"Lilau"}, ["llm"] = {"Lasalimu"}, ["lln"] = {"Lele (Chad)"}, ["llp"] = {"North Efate"}, ["llq"] = {"Lolak"}, ["lls"] = {"Lithuanian Sign Language"}, ["llu"] = {"Lau"}, ["llx"] = {"Lauan"}, ["lma"] = {"East Limba"}, ["lmb"] = {"Merei"}, ["lmc"] = {"Limilngan"}, ["lmd"] = {"Lumun"}, ["lme"] = {"Pévé"}, ["lmf"] = {"South Lembata"}, ["lmg"] = {"Lamogai"}, ["lmh"] = {"Lambichhong"}, ["lmi"] = {"Lombi"}, ["lmj"] = {"West Lembata"}, ["lmk"] = {"Lamkang"}, ["lml"] = {"Hano"}, ["lmn"] = {"Lambadi"}, ["lmo"] = {"Lombard"}, ["lmp"] = {"Limbum"}, ["lmq"] = {"Lamatuka"}, ["lmr"] = {"Lamalera"}, ["lmu"] = {"Lamenu"}, ["lmv"] = {"Lomaiviti"}, ["lmw"] = {"Lake Miwok"}, ["lmx"] = {"Laimbue"}, ["lmy"] = {"Lamboya"}, ["lna"] = {"Langbashe"}, ["lnb"] = {"Mbalanhu"}, ["lnd"] = {"Lundayeh", "Lun Bawang"}, ["lng"] = {"Langobardic"}, ["lnh"] = {"Lanoh"}, ["lni"] = {"Daantanai'"}, ["lnj"] = {"Leningitij"}, ["lnl"] = {"South Central Banda"}, ["lnm"] = {"Langam"}, ["lnn"] = {"Lorediakarkar"}, ["lns"] = {"Lamnso'"}, ["lnu"] = {"Longuda"}, ["lnw"] = {"Lanima"}, ["lnz"] = {"Lonzo"}, ["loa"] = {"Loloda"}, ["lob"] = {"Lobi"}, ["loc"] = {"Inonhan"}, ["loe"] = {"Saluan"}, ["lof"] = {"Logol"}, ["log"] = {"Logo"}, ["loh"] = {"Laarim", "Narim"}, ["loi"] = {"Loma (Côte d'Ivoire)"}, ["loj"] = {"Lou"}, ["lok"] = {"Loko"}, ["lol"] = {"Mongo"}, ["lom"] = {"Loma (Liberia)"}, ["lon"] = {"Malawi Lomwe"}, ["loo"] = {"Lombo"}, ["lop"] = {"Lopa"}, ["loq"] = {"Lobala"}, ["lor"] = {"Téén"}, ["los"] = {"Loniu"}, ["lot"] = {"Otuho"}, ["lou"] = {"Louisiana Creole"}, ["lov"] = {"Lopi"}, ["low"] = {"Tampias Lobu"}, ["lox"] = {"Loun"}, ["loy"] = {"Loke"}, ["loz"] = {"Lozi"}, ["lpa"] = {"Lelepa"}, ["lpe"] = {"Lepki"}, ["lpn"] = {"Long Phuri Naga"}, ["lpo"] = {"Lipo"}, ["lpx"] = {"Lopit"}, ["lqr"] = {"Logir"}, ["lra"] = {"Rara Bakati'"}, ["lrc"] = {"Northern Luri"}, ["lre"] = {"Laurentian"}, ["lrg"] = {"Laragia"}, ["lri"] = {"Marachi", "Olumarachi"}, ["lrk"] = {"Loarki"}, ["lrl"] = {"Lari"}, ["lrm"] = {"Marama", "Olumarama"}, ["lrn"] = {"Lorang"}, ["lro"] = {"Laro"}, ["lrr"] = {"Southern Yamphu"}, ["lrt"] = {"Larantuka Malay"}, ["lrv"] = {"Larevat"}, ["lrz"] = {"Lemerig"}, ["lsa"] = {"Lasgerdi"}, ["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"}, ["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"}, ["lsd"] = {"Lishana Deni"}, ["lse"] = {"Lusengo"}, ["lsh"] = {"Lish"}, ["lsi"] = {"Lashi"}, ["lsl"] = {"Latvian Sign Language"}, ["lsm"] = {"Saamia", "Olusamia"}, ["lsn"] = {"Tibetan Sign Language"}, ["lso"] = {"Laos Sign Language"}, ["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"}, ["lsr"] = {"Aruop"}, ["lss"] = {"Lasi"}, ["lst"] = {"Trinidad and Tobago Sign Language"}, ["lsv"] = {"Sivia Sign Language"}, ["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"}, ["lsy"] = {"Mauritian Sign Language"}, ["ltc"] = {"Late Middle Chinese"}, ["ltg"] = {"Latgalian"}, ["lth"] = {"Thur"}, ["lti"] = {"Leti (Indonesia)"}, ["ltn"] = {"Latundê"}, ["lto"] = {"Tsotso", "Olutsotso"}, ["lts"] = {"Tachoni", "Lutachoni"}, ["ltu"] = {"Latu"}, ["lua"] = {"Luba-Lulua"}, ["luc"] = {"Aringa"}, ["lud"] = {"Ludian"}, ["lue"] = {"Luvale"}, ["luf"] = {"Laua"}, ["lui"] = {"Luiseno"}, ["luj"] = {"Luna"}, ["luk"] = {"Lunanakha"}, ["lul"] = {"Olu'bo"}, ["lum"] = {"Luimbi"}, ["lun"] = {"Lunda"}, ["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"}, ["lup"] = {"Lumbu"}, ["luq"] = {"Lucumi"}, ["lur"] = {"Laura"}, ["lus"] = {"Lushai"}, ["lut"] = {"Lushootseed"}, ["luu"] = {"Lumba-Yakkha"}, ["luv"] = {"Luwati"}, ["luw"] = {"Luo (Cameroon)"}, ["luy"] = {"Luyia", "Oluluyia"}, ["luz"] = {"Southern Luri"}, ["lva"] = {"Maku'a"}, ["lvi"] = {"Lavi"}, ["lvk"] = {"Lavukaleve"}, ["lvl"] = {"Lwel"}, ["lvs"] = {"Standard Latvian"}, ["lvu"] = {"Levuka"}, ["lwa"] = {"Lwalu"}, ["lwe"] = {"Lewo Eleng"}, ["lwg"] = {"Wanga", "Oluwanga"}, ["lwh"] = {"White Lachi"}, ["lwl"] = {"Eastern Lawa"}, ["lwm"] = {"Laomian"}, ["lwo"] = {"Luwo"}, ["lws"] = {"Malawian Sign Language"}, ["lwt"] = {"Lewotobi"}, ["lwu"] = {"Lawu"}, ["lww"] = {"Lewo"}, ["lxm"] = {"Lakurumau"}, ["lya"] = {"Layakha"}, ["lyg"] = {"Lyngngam"}, ["lyn"] = {"Luyana"}, ["lzh"] = {"Literary Chinese"}, ["lzl"] = {"Litzlitz"}, ["lzn"] = {"Leinong Naga"}, ["lzz"] = {"Laz"}, ["maa"] = {"San Jerónimo Tecóatl Mazatec"}, ["mab"] = {"Yutanduchi Mixtec"}, ["mad"] = {"Madurese"}, ["mae"] = {"Bo-Rukul"}, ["maf"] = {"Mafa"}, ["mag"] = {"Magahi"}, ["mai"] = {"Maithili"}, ["maj"] = {"Jalapa De Díaz Mazatec"}, ["mak"] = {"Makasar"}, ["mam"] = {"Mam"}, ["man"] = {"Mandingo", "Manding"}, ["map"] = {"Austronesian languages"}, ["maq"] = {"Chiquihuitlán Mazatec"}, ["mas"] = {"Masai"}, ["mat"] = {"San Francisco Matlatzinca"}, ["mau"] = {"Huautla Mazatec"}, ["mav"] = {"Sateré-Mawé"}, ["maw"] = {"Mampruli"}, ["max"] = {"North Moluccan Malay"}, ["maz"] = {"Central Mazahua"}, ["mba"] = {"Higaonon"}, ["mbb"] = {"Western Bukidnon Manobo"}, ["mbc"] = {"Macushi"}, ["mbd"] = {"Dibabawon Manobo"}, ["mbe"] = {"Molale"}, ["mbf"] = {"Baba Malay"}, ["mbh"] = {"Mangseng"}, ["mbi"] = {"Ilianen Manobo"}, ["mbj"] = {"Nadëb"}, ["mbk"] = {"Malol"}, ["mbl"] = {"Maxakalí"}, ["mbm"] = {"Ombamba"}, ["mbn"] = {"Macaguán"}, ["mbo"] = {"Mbo (Cameroon)"}, ["mbp"] = {"Malayo"}, ["mbq"] = {"Maisin"}, ["mbr"] = {"Nukak Makú"}, ["mbs"] = {"Sarangani Manobo"}, ["mbt"] = {"Matigsalug Manobo"}, ["mbu"] = {"Mbula-Bwazza"}, ["mbv"] = {"Mbulungish"}, ["mbw"] = {"Maring"}, ["mbx"] = {"Mari (East Sepik Province)"}, ["mby"] = {"Memoni"}, ["mbz"] = {"Amoltepec Mixtec"}, ["mca"] = {"Maca"}, ["mcb"] = {"Machiguenga"}, ["mcc"] = {"Bitur"}, ["mcd"] = {"Sharanahua"}, ["mce"] = {"Itundujia Mixtec"}, ["mcf"] = {"Matsés"}, ["mcg"] = {"Mapoyo"}, ["mch"] = {"Maquiritari"}, ["mci"] = {"Mese"}, ["mcj"] = {"Mvanip"}, ["mck"] = {"Mbunda"}, ["mcl"] = {"Macaguaje"}, ["mcm"] = {"Malaccan Creole Portuguese"}, ["mcn"] = {"Masana"}, ["mco"] = {"Coatlán Mixe"}, ["mcp"] = {"Makaa"}, ["mcq"] = {"Ese"}, ["mcr"] = {"Menya"}, ["mcs"] = {"Mambai"}, ["mct"] = {"Mengisa"}, ["mcu"] = {"Cameroon Mambila"}, ["mcv"] = {"Minanibai"}, ["mcw"] = {"Mawa (Chad)"}, ["mcx"] = {"Mpiemo"}, ["mcy"] = {"South Watut"}, ["mcz"] = {"Mawan"}, ["mda"] = {"Mada (Nigeria)"}, ["mdb"] = {"Morigi"}, ["mdc"] = {"Male (Papua New Guinea)"}, ["mdd"] = {"Mbum"}, ["mde"] = {"Maba (Chad)"}, ["mdf"] = {"Moksha"}, ["mdg"] = {"Massalat"}, ["mdh"] = {"Maguindanaon"}, ["mdi"] = {"Mamvu"}, ["mdj"] = {"Mangbetu"}, ["mdk"] = {"Mangbutu"}, ["mdl"] = {"Maltese Sign Language"}, ["mdm"] = {"Mayogo"}, ["mdn"] = {"Mbati"}, ["mdp"] = {"Mbala"}, ["mdq"] = {"Mbole"}, ["mdr"] = {"Mandar"}, ["mds"] = {"Maria (Papua New Guinea)"}, ["mdt"] = {"Mbere"}, ["mdu"] = {"Mboko"}, ["mdv"] = {"Santa Lucía Monteverde Mixtec"}, ["mdw"] = {"Mbosi"}, ["mdx"] = {"Dizin"}, ["mdy"] = {"Male (Ethiopia)"}, ["mdz"] = {"Suruí Do Pará"}, ["mea"] = {"Menka"}, ["meb"] = {"Ikobi"}, ["mec"] = {"Marra"}, ["med"] = {"Melpa"}, ["mee"] = {"Mengen"}, ["mef"] = {"Megam"}, ["meh"] = {"Southwestern Tlaxiaco Mixtec"}, ["mei"] = {"Midob"}, ["mej"] = {"Meyah"}, ["mek"] = {"Mekeo"}, ["mel"] = {"Central Melanau"}, ["mem"] = {"Mangala"}, ["men"] = {"Mende (Sierra Leone)"}, ["meo"] = {"Kedah Malay"}, ["mep"] = {"Miriwoong"}, ["meq"] = {"Merey"}, ["mer"] = {"Meru"}, ["mes"] = {"Masmaje"}, ["met"] = {"Mato"}, ["meu"] = {"Motu"}, ["mev"] = {"Mano"}, ["mew"] = {"Maaka"}, ["mey"] = {"Hassaniyya"}, ["mez"] = {"Menominee"}, ["mfa"] = {"Pattani Malay"}, ["mfb"] = {"Bangka"}, ["mfc"] = {"Mba"}, ["mfd"] = {"Mendankwe-Nkwen"}, ["mfe"] = {"Morisyen"}, ["mff"] = {"Naki"}, ["mfg"] = {"Mogofin"}, ["mfh"] = {"Matal"}, ["mfi"] = {"Wandala"}, ["mfj"] = {"Mefele"}, ["mfk"] = {"North Mofu"}, ["mfl"] = {"Putai"}, ["mfm"] = {"Marghi South"}, ["mfn"] = {"Cross River Mbembe"}, ["mfo"] = {"Mbe"}, ["mfp"] = {"Makassar Malay"}, ["mfq"] = {"Moba"}, ["mfr"] = {"Marrithiyel"}, ["mfs"] = {"Mexican Sign Language"}, ["mft"] = {"Mokerang"}, ["mfu"] = {"Mbwela"}, ["mfv"] = {"Mandjak"}, ["mfw"] = {"Mulaha"}, ["mfx"] = {"Melo"}, ["mfy"] = {"Mayo"}, ["mfz"] = {"Mabaan"}, ["mga"] = {"Middle Irish (900-1200)"}, ["mgb"] = {"Mararit"}, ["mgc"] = {"Morokodo"}, ["mgd"] = {"Moru"}, ["mge"] = {"Mango"}, ["mgf"] = {"Maklew"}, ["mgg"] = {"Mpumpong"}, ["mgh"] = {"Makhuwa-Meetto"}, ["mgi"] = {"Lijili"}, ["mgj"] = {"Abureni"}, ["mgk"] = {"Mawes"}, ["mgl"] = {"Maleu-Kilenge"}, ["mgm"] = {"Mambae"}, ["mgn"] = {"Mbangi"}, ["mgo"] = {"Meta'"}, ["mgp"] = {"Eastern Magar"}, ["mgq"] = {"Malila"}, ["mgr"] = {"Mambwe-Lungu"}, ["mgs"] = {"Manda (Tanzania)"}, ["mgt"] = {"Mongol"}, ["mgu"] = {"Mailu"}, ["mgv"] = {"Matengo"}, ["mgw"] = {"Matumbi"}, ["mgy"] = {"Mbunga"}, ["mgz"] = {"Mbugwe"}, ["mha"] = {"Manda (India)"}, ["mhb"] = {"Mahongwe"}, ["mhc"] = {"Mocho"}, ["mhd"] = {"Mbugu"}, ["mhe"] = {"Besisi", "Mah Meri"}, ["mhf"] = {"Mamaa"}, ["mhg"] = {"Margu"}, ["mhi"] = {"Ma'di"}, ["mhj"] = {"Mogholi"}, ["mhk"] = {"Mungaka"}, ["mhl"] = {"Mauwake"}, ["mhm"] = {"Makhuwa-Moniga"}, ["mhn"] = {"Mócheno"}, ["mho"] = {"Mashi (Zambia)"}, ["mhp"] = {"Balinese Malay"}, ["mhq"] = {"Mandan"}, ["mhr"] = {"Eastern Mari"}, ["mhs"] = {"Buru (Indonesia)"}, ["mht"] = {"Mandahuaca"}, ["mhu"] = {"Digaro-Mishmi", "Darang Deng"}, ["mhw"] = {"Mbukushu"}, ["mhx"] = {"Maru", "Lhaovo"}, ["mhy"] = {"Ma'anyan"}, ["mhz"] = {"Mor (Mor Islands)"}, ["mia"] = {"Miami"}, ["mib"] = {"Atatláhuca Mixtec"}, ["mic"] = {"Mi'kmaq", "Micmac"}, ["mid"] = {"Mandaic"}, ["mie"] = {"Ocotepec Mixtec"}, ["mif"] = {"Mofu-Gudur"}, ["mig"] = {"San Miguel El Grande Mixtec"}, ["mih"] = {"Chayuco Mixtec"}, ["mii"] = {"Chigmecatitlán Mixtec"}, ["mij"] = {"Abar", "Mungbam"}, ["mik"] = {"Mikasuki"}, ["mil"] = {"Peñoles Mixtec"}, ["mim"] = {"Alacatlatzala Mixtec"}, ["min"] = {"Minangkabau"}, ["mio"] = {"Pinotepa Nacional Mixtec"}, ["mip"] = {"Apasco-Apoala Mixtec"}, ["miq"] = {"Mískito"}, ["mir"] = {"Isthmus Mixe"}, ["mis"] = {"Uncoded languages"}, ["mit"] = {"Southern Puebla Mixtec"}, ["miu"] = {"Cacaloxtepec Mixtec"}, ["miw"] = {"Akoye"}, ["mix"] = {"Mixtepec Mixtec"}, ["miy"] = {"Ayutla Mixtec"}, ["miz"] = {"Coatzospan Mixtec"}, ["mjb"] = {"Makalero"}, ["mjc"] = {"San Juan Colorado Mixtec"}, ["mjd"] = {"Northwest Maidu"}, ["mje"] = {"Muskum"}, ["mjg"] = {"Tu"}, ["mjh"] = {"Mwera (Nyasa)"}, ["mji"] = {"Kim Mun"}, ["mjj"] = {"Mawak"}, ["mjk"] = {"Matukar"}, ["mjl"] = {"Mandeali"}, ["mjm"] = {"Medebur"}, ["mjn"] = {"Ma (Papua New Guinea)"}, ["mjo"] = {"Malankuravan"}, ["mjp"] = {"Malapandaram"}, ["mjq"] = {"Malaryan"}, ["mjr"] = {"Malavedan"}, ["mjs"] = {"Miship"}, ["mjt"] = {"Sauria Paharia"}, ["mju"] = {"Manna-Dora"}, ["mjv"] = {"Mannan"}, ["mjw"] = {"Karbi"}, ["mjx"] = {"Mahali"}, ["mjy"] = {"Mahican"}, ["mjz"] = {"Majhi"}, ["mka"] = {"Mbre"}, ["mkb"] = {"Mal Paharia"}, ["mkc"] = {"Siliput"}, ["mke"] = {"Mawchi"}, ["mkf"] = {"Miya"}, ["mkg"] = {"Mak (China)"}, ["mkh"] = {"Mon-Khmer languages"}, ["mki"] = {"Dhatki"}, ["mkj"] = {"Mokilese"}, ["mkk"] = {"Byep"}, ["mkl"] = {"Mokole"}, ["mkm"] = {"Moklen"}, ["mkn"] = {"Kupang Malay"}, ["mko"] = {"Mingang Doso"}, ["mkp"] = {"Moikodi"}, ["mkq"] = {"Bay Miwok"}, ["mkr"] = {"Malas"}, ["mks"] = {"Silacayoapan Mixtec"}, ["mkt"] = {"Vamale"}, ["mku"] = {"Konyanka Maninka"}, ["mkv"] = {"Mafea"}, ["mkw"] = {"Kituba (Congo)"}, ["mkx"] = {"Kinamiging Manobo"}, ["mky"] = {"East Makian"}, ["mkz"] = {"Makasae"}, ["mla"] = {"Malo"}, ["mlb"] = {"Mbule"}, ["mlc"] = {"Cao Lan"}, ["mle"] = {"Manambu"}, ["mlf"] = {"Mal"}, ["mlh"] = {"Mape"}, ["mli"] = {"Malimpung"}, ["mlj"] = {"Miltu"}, ["mlk"] = {"Ilwana", "Kiwilwana"}, ["mll"] = {"Malua Bay"}, ["mlm"] = {"Mulam"}, ["mln"] = {"Malango"}, ["mlo"] = {"Mlomp"}, ["mlp"] = {"Bargam"}, ["mlq"] = {"Western Maninkakan"}, ["mlr"] = {"Vame"}, ["mls"] = {"Masalit"}, ["mlu"] = {"To'abaita"}, ["mlv"] = {"Motlav", "Mwotlap"}, ["mlw"] = {"Moloko"}, ["mlx"] = {"Malfaxal", "Naha'ai"}, ["mlz"] = {"Malaynon"}, ["mma"] = {"Mama"}, ["mmb"] = {"Momina"}, ["mmc"] = {"Michoacán Mazahua"}, ["mmd"] = {"Maonan"}, ["mme"] = {"Mae"}, ["mmf"] = {"Mundat"}, ["mmg"] = {"North Ambrym"}, ["mmh"] = {"Mehináku"}, ["mmi"] = {"Musar"}, ["mmj"] = {"Majhwar"}, ["mmk"] = {"Mukha-Dora"}, ["mml"] = {"Man Met"}, ["mmm"] = {"Maii"}, ["mmn"] = {"Mamanwa"}, ["mmo"] = {"Mangga Buang"}, ["mmp"] = {"Siawi"}, ["mmq"] = {"Musak"}, ["mmr"] = {"Western Xiangxi Miao"}, ["mmt"] = {"Malalamai"}, ["mmu"] = {"Mmaala"}, ["mmv"] = {"Miriti"}, ["mmw"] = {"Emae"}, ["mmx"] = {"Madak"}, ["mmy"] = {"Migaama"}, ["mmz"] = {"Mabaale"}, ["mna"] = {"Mbula"}, ["mnb"] = {"Muna"}, ["mnc"] = {"Manchu"}, ["mnd"] = {"Mondé"}, ["mne"] = {"Naba"}, ["mnf"] = {"Mundani"}, ["mng"] = {"Eastern Mnong"}, ["mnh"] = {"Mono (Democratic Republic of Congo)"}, ["mni"] = {"Manipuri"}, ["mnj"] = {"Munji"}, ["mnk"] = {"Mandinka"}, ["mnl"] = {"Tiale"}, ["mnm"] = {"Mapena"}, ["mnn"] = {"Southern Mnong"}, ["mno"] = {"Manobo languages"}, ["mnp"] = {"Min Bei Chinese"}, ["mnq"] = {"Minriq"}, ["mnr"] = {"Mono (USA)"}, ["mns"] = {"Mansi"}, ["mnu"] = {"Mer"}, ["mnv"] = {"Rennell-Bellona"}, ["mnw"] = {"Mon"}, ["mnx"] = {"Manikion"}, ["mny"] = {"Manyawa"}, ["mnz"] = {"Moni"}, ["moa"] = {"Mwan"}, ["moc"] = {"Mocoví"}, ["mod"] = {"Mobilian"}, ["moe"] = {"Innu", "Montagnais"}, ["mog"] = {"Mongondow"}, ["moh"] = {"Mohawk"}, ["moi"] = {"Mboi"}, ["moj"] = {"Monzombo"}, ["mok"] = {"Morori"}, ["mom"] = {"Mangue"}, ["moo"] = {"Monom"}, ["mop"] = {"Mopán Maya"}, ["moq"] = {"Mor (Bomberai Peninsula)"}, ["mor"] = {"Moro"}, ["mos"] = {"Mossi"}, ["mot"] = {"Barí"}, ["mou"] = {"Mogum"}, ["mov"] = {"Mohave"}, ["mow"] = {"Moi (Congo)"}, ["mox"] = {"Molima"}, ["moy"] = {"Shekkacho"}, ["moz"] = {"Mukulu", "Gergiko"}, ["mpa"] = {"Mpoto"}, ["mpb"] = {"Malak Malak", "Mullukmulluk"}, ["mpc"] = {"Mangarrayi"}, ["mpd"] = {"Machinere"}, ["mpe"] = {"Majang"}, ["mpg"] = {"Marba"}, ["mph"] = {"Maung"}, ["mpi"] = {"Mpade"}, ["mpj"] = {"Martu Wangka", "Wangkajunga"}, ["mpk"] = {"Mbara (Chad)"}, ["mpl"] = {"Middle Watut"}, ["mpm"] = {"Yosondúa Mixtec"}, ["mpn"] = {"Mindiri"}, ["mpo"] = {"Miu"}, ["mpp"] = {"Migabac"}, ["mpq"] = {"Matís"}, ["mpr"] = {"Vangunu"}, ["mps"] = {"Dadibi"}, ["mpt"] = {"Mian"}, ["mpu"] = {"Makuráp"}, ["mpv"] = {"Mungkip"}, ["mpw"] = {"Mapidian"}, ["mpx"] = {"Misima-Panaeati"}, ["mpy"] = {"Mapia"}, ["mpz"] = {"Mpi"}, ["mqa"] = {"Maba (Indonesia)"}, ["mqb"] = {"Mbuko"}, ["mqc"] = {"Mangole"}, ["mqe"] = {"Matepi"}, ["mqf"] = {"Momuna"}, ["mqg"] = {"Kota Bangun Kutai Malay"}, ["mqh"] = {"Tlazoyaltepec Mixtec"}, ["mqi"] = {"Mariri"}, ["mqj"] = {"Mamasa"}, ["mqk"] = {"Rajah Kabunsuwan Manobo"}, ["mql"] = {"Mbelime"}, ["mqm"] = {"South Marquesan"}, ["mqn"] = {"Moronene"}, ["mqo"] = {"Modole"}, ["mqp"] = {"Manipa"}, ["mqq"] = {"Minokok"}, ["mqr"] = {"Mander"}, ["mqs"] = {"West Makian"}, ["mqt"] = {"Mok"}, ["mqu"] = {"Mandari"}, ["mqv"] = {"Mosimo"}, ["mqw"] = {"Murupi"}, ["mqx"] = {"Mamuju"}, ["mqy"] = {"Manggarai"}, ["mqz"] = {"Pano"}, ["mra"] = {"Mlabri"}, ["mrb"] = {"Marino"}, ["mrc"] = {"Maricopa"}, ["mrd"] = {"Western Magar"}, ["mre"] = {"Martha's Vineyard Sign Language"}, ["mrf"] = {"Elseng"}, ["mrg"] = {"Mising"}, ["mrh"] = {"Mara Chin"}, ["mrj"] = {"Western Mari"}, ["mrk"] = {"Hmwaveke"}, ["mrl"] = {"Mortlockese"}, ["mrm"] = {"Merlav", "Mwerlap"}, ["mrn"] = {"Cheke Holo"}, ["mro"] = {"Mru"}, ["mrp"] = {"Morouas"}, ["mrq"] = {"North Marquesan"}, ["mrr"] = {"Maria (India)"}, ["mrs"] = {"Maragus"}, ["mrt"] = {"Marghi Central"}, ["mru"] = {"Mono (Cameroon)"}, ["mrv"] = {"Mangareva"}, ["mrw"] = {"Maranao"}, ["mrx"] = {"Maremgi", "Dineor"}, ["mry"] = {"Mandaya"}, ["mrz"] = {"Marind"}, ["msb"] = {"Masbatenyo"}, ["msc"] = {"Sankaran Maninka"}, ["msd"] = {"Yucatec Maya Sign Language"}, ["mse"] = {"Musey"}, ["msf"] = {"Mekwei"}, ["msg"] = {"Moraid"}, ["msh"] = {"Masikoro Malagasy"}, ["msi"] = {"Sabah Malay"}, ["msj"] = {"Ma (Democratic Republic of Congo)"}, ["msk"] = {"Mansaka"}, ["msl"] = {"Molof", "Poule"}, ["msm"] = {"Agusan Manobo"}, ["msn"] = {"Vurës"}, ["mso"] = {"Mombum"}, ["msp"] = {"Maritsauá"}, ["msq"] = {"Caac"}, ["msr"] = {"Mongolian Sign Language"}, ["mss"] = {"West Masela"}, ["msu"] = {"Musom"}, ["msv"] = {"Maslam"}, ["msw"] = {"Mansoanka"}, ["msx"] = {"Moresada"}, ["msy"] = {"Aruamu"}, ["msz"] = {"Momare"}, ["mta"] = {"Cotabato Manobo"}, ["mtb"] = {"Anyin Morofo"}, ["mtc"] = {"Munit"}, ["mtd"] = {"Mualang"}, ["mte"] = {"Mono (Solomon Islands)"}, ["mtf"] = {"Murik (Papua New Guinea)"}, ["mtg"] = {"Una"}, ["mth"] = {"Munggui"}, ["mti"] = {"Maiwa (Papua New Guinea)"}, ["mtj"] = {"Moskona"}, ["mtk"] = {"Mbe'"}, ["mtl"] = {"Montol"}, ["mtm"] = {"Mator"}, ["mtn"] = {"Matagalpa"}, ["mto"] = {"Totontepec Mixe"}, ["mtp"] = {"Wichí Lhamtés Nocten"}, ["mtq"] = {"Muong"}, ["mtr"] = {"Mewari"}, ["mts"] = {"Yora"}, ["mtt"] = {"Mota"}, ["mtu"] = {"Tututepec Mixtec"}, ["mtv"] = {"Asaro'o"}, ["mtw"] = {"Southern Binukidnon"}, ["mtx"] = {"Tidaá Mixtec"}, ["mty"] = {"Nabi"}, ["mua"] = {"Mundang"}, ["mub"] = {"Mubi"}, ["muc"] = {"Ajumbu"}, ["mud"] = {"Mednyj Aleut"}, ["mue"] = {"Media Lengua"}, ["mug"] = {"Musgu"}, ["muh"] = {"Mündü"}, ["mui"] = {"Musi"}, ["muj"] = {"Mabire"}, ["muk"] = {"Mugom"}, ["mul"] = {"Multiple languages"}, ["mum"] = {"Maiwala"}, ["mun"] = {"Munda languages"}, ["muo"] = {"Nyong"}, ["mup"] = {"Malvi"}, ["muq"] = {"Eastern Xiangxi Miao"}, ["mur"] = {"Murle"}, ["mus"] = {"Creek"}, ["mut"] = {"Western Muria"}, ["muu"] = {"Yaaku"}, ["muv"] = {"Muthuvan"}, ["mux"] = {"Bo-Ung"}, ["muy"] = {"Muyang"}, ["muz"] = {"Mursi"}, ["mva"] = {"Manam"}, ["mvb"] = {"Mattole"}, ["mvd"] = {"Mamboru"}, ["mve"] = {"Marwari (Pakistan)"}, ["mvf"] = {"Peripheral Mongolian"}, ["mvg"] = {"Yucuañe Mixtec"}, ["mvh"] = {"Mulgi"}, ["mvi"] = {"Miyako"}, ["mvk"] = {"Mekmek"}, ["mvl"] = {"Mbara (Australia)"}, ["mvn"] = {"Minaveha"}, ["mvo"] = {"Marovo"}, ["mvp"] = {"Duri"}, ["mvq"] = {"Moere"}, ["mvr"] = {"Marau"}, ["mvs"] = {"Massep"}, ["mvt"] = {"Mpotovoro"}, ["mvu"] = {"Marfa"}, ["mvv"] = {"Tagal Murut"}, ["mvw"] = {"Machinga"}, ["mvx"] = {"Meoswar"}, ["mvy"] = {"Indus Kohistani"}, ["mvz"] = {"Mesqan"}, ["mwa"] = {"Mwatebu"}, ["mwb"] = {"Juwal"}, ["mwc"] = {"Are"}, ["mwe"] = {"Mwera (Chimwera)"}, ["mwf"] = {"Murrinh-Patha"}, ["mwg"] = {"Aiklep"}, ["mwh"] = {"Mouk-Aria"}, ["mwi"] = {"Labo", "Ninde"}, ["mwk"] = {"Kita Maninkakan"}, ["mwl"] = {"Mirandese"}, ["mwm"] = {"Sar"}, ["mwn"] = {"Nyamwanga"}, ["mwo"] = {"Central Maewo"}, ["mwp"] = {"Kala Lagaw Ya"}, ["mwq"] = {"Mün Chin"}, ["mwr"] = {"Marwari"}, ["mws"] = {"Mwimbi-Muthambi"}, ["mwt"] = {"Moken"}, ["mwu"] = {"Mittu"}, ["mwv"] = {"Mentawai"}, ["mww"] = {"Hmong Daw"}, ["mwz"] = {"Moingi"}, ["mxa"] = {"Northwest Oaxaca Mixtec"}, ["mxb"] = {"Tezoatlán Mixtec"}, ["mxc"] = {"Manyika"}, ["mxd"] = {"Modang"}, ["mxe"] = {"Mele-Fila"}, ["mxf"] = {"Malgbe"}, ["mxg"] = {"Mbangala"}, ["mxh"] = {"Mvuba"}, ["mxi"] = {"Mozarabic"}, ["mxj"] = {"Miju-Mishmi", "Geman Deng"}, ["mxk"] = {"Monumbo"}, ["mxl"] = {"Maxi Gbe"}, ["mxm"] = {"Meramera"}, ["mxn"] = {"Moi (Indonesia)"}, ["mxo"] = {"Mbowe"}, ["mxp"] = {"Tlahuitoltepec Mixe"}, ["mxq"] = {"Juquila Mixe"}, ["mxr"] = {"Murik (Malaysia)"}, ["mxs"] = {"Huitepec Mixtec"}, ["mxt"] = {"Jamiltepec Mixtec"}, ["mxu"] = {"Mada (Cameroon)"}, ["mxv"] = {"Metlatónoc Mixtec"}, ["mxw"] = {"Namo"}, ["mxx"] = {"Mahou", "Mawukakan"}, ["mxy"] = {"Southeastern Nochixtlán Mixtec"}, ["mxz"] = {"Central Masela"}, ["myb"] = {"Mbay"}, ["myc"] = {"Mayeka"}, ["mye"] = {"Myene"}, ["myf"] = {"Bambassi"}, ["myg"] = {"Manta"}, ["myh"] = {"Makah"}, ["myj"] = {"Mangayat"}, ["myk"] = {"Mamara Senoufo"}, ["myl"] = {"Moma"}, ["mym"] = {"Me'en"}, ["myn"] = {"Mayan languages"}, ["myo"] = {"Anfillo"}, ["myp"] = {"Pirahã"}, ["myr"] = {"Muniche"}, ["mys"] = {"Mesmes"}, ["myu"] = {"Mundurukú"}, ["myv"] = {"Erzya"}, ["myw"] = {"Muyuw"}, ["myx"] = {"Masaaba"}, ["myy"] = {"Macuna"}, ["myz"] = {"Classical Mandaic"}, ["mza"] = {"Santa María Zacatepec Mixtec"}, ["mzb"] = {"Tumzabt"}, ["mzc"] = {"Madagascar Sign Language"}, ["mzd"] = {"Malimba"}, ["mze"] = {"Morawa"}, ["mzg"] = {"Monastic Sign Language"}, ["mzh"] = {"Wichí Lhamtés Güisnay"}, ["mzi"] = {"Ixcatlán Mazatec"}, ["mzj"] = {"Manya"}, ["mzk"] = {"Nigeria Mambila"}, ["mzl"] = {"Mazatlán Mixe"}, ["mzm"] = {"Mumuye"}, ["mzn"] = {"Mazanderani"}, ["mzo"] = {"Matipuhy"}, ["mzp"] = {"Movima"}, ["mzq"] = {"Mori Atas"}, ["mzr"] = {"Marúbo"}, ["mzs"] = {"Macanese"}, ["mzt"] = {"Mintil"}, ["mzu"] = {"Inapang"}, ["mzv"] = {"Manza"}, ["mzw"] = {"Deg"}, ["mzx"] = {"Mawayana"}, ["mzy"] = {"Mozambican Sign Language"}, ["mzz"] = {"Maiadomu"}, ["naa"] = {"Namla"}, ["nab"] = {"Southern Nambikuára"}, ["nac"] = {"Narak"}, ["nae"] = {"Naka'ela"}, ["naf"] = {"Nabak"}, ["nag"] = {"Naga Pidgin"}, ["nah"] = {"Nahuatl languages"}, ["nai"] = {"North American Indian languages"}, ["naj"] = {"Nalu"}, ["nak"] = {"Nakanai"}, ["nal"] = {"Nalik"}, ["nam"] = {"Ngan'gityemerri"}, ["nan"] = {"Min Nan Chinese"}, ["nao"] = {"Naaba"}, ["nap"] = {"Neapolitan"}, ["naq"] = {"Khoekhoe", "Nama (Namibia)"}, ["nar"] = {"Iguta"}, ["nas"] = {"Naasioi"}, ["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"}, ["naw"] = {"Nawuri"}, ["nax"] = {"Nakwi"}, ["nay"] = {"Ngarrindjeri"}, ["naz"] = {"Coatepec Nahuatl"}, ["nba"] = {"Nyemba"}, ["nbb"] = {"Ndoe"}, ["nbc"] = {"Chang Naga"}, ["nbd"] = {"Ngbinda"}, ["nbe"] = {"Konyak Naga"}, ["nbg"] = {"Nagarchal"}, ["nbh"] = {"Ngamo"}, ["nbi"] = {"Mao Naga"}, ["nbj"] = {"Ngarinyman"}, ["nbk"] = {"Nake"}, ["nbm"] = {"Ngbaka Ma'bo"}, ["nbn"] = {"Kuri"}, ["nbo"] = {"Nkukoli"}, ["nbp"] = {"Nnam"}, ["nbq"] = {"Nggem"}, ["nbr"] = {"Numana"}, ["nbs"] = {"Namibian Sign Language"}, ["nbt"] = {"Na"}, ["nbu"] = {"Rongmei Naga"}, ["nbv"] = {"Ngamambo"}, ["nbw"] = {"Southern Ngbandi"}, ["nby"] = {"Ningera"}, ["nca"] = {"Iyo"}, ["ncb"] = {"Central Nicobarese"}, ["ncc"] = {"Ponam"}, ["ncd"] = {"Nachering"}, ["nce"] = {"Yale"}, ["ncf"] = {"Notsi"}, ["ncg"] = {"Nisga'a"}, ["nch"] = {"Central Huasteca Nahuatl"}, ["nci"] = {"Classical Nahuatl"}, ["ncj"] = {"Northern Puebla Nahuatl"}, ["nck"] = {"Na-kara"}, ["ncl"] = {"Michoacán Nahuatl"}, ["ncm"] = {"Nambo"}, ["ncn"] = {"Nauna"}, ["nco"] = {"Sibe"}, ["ncq"] = {"Northern Katang"}, ["ncr"] = {"Ncane"}, ["ncs"] = {"Nicaraguan Sign Language"}, ["nct"] = {"Chothe Naga"}, ["ncu"] = {"Chumburung"}, ["ncx"] = {"Central Puebla Nahuatl"}, ["ncz"] = {"Natchez"}, ["nda"] = {"Ndasa"}, ["ndb"] = {"Kenswei Nsei"}, ["ndc"] = {"Ndau"}, ["ndd"] = {"Nde-Nsele-Nta"}, ["ndf"] = {"Nadruvian"}, ["ndg"] = {"Ndengereko"}, ["ndh"] = {"Ndali"}, ["ndi"] = {"Samba Leko"}, ["ndj"] = {"Ndamba"}, ["ndk"] = {"Ndaka"}, ["ndl"] = {"Ndolo"}, ["ndm"] = {"Ndam"}, ["ndn"] = {"Ngundi"}, ["ndp"] = {"Ndo"}, ["ndq"] = {"Ndombe"}, ["ndr"] = {"Ndoola"}, ["nds"] = {"Low German", "Low Saxon"}, ["ndt"] = {"Ndunga"}, ["ndu"] = {"Dugun"}, ["ndv"] = {"Ndut"}, ["ndw"] = {"Ndobo"}, ["ndx"] = {"Nduga"}, ["ndy"] = {"Lutos"}, ["ndz"] = {"Ndogo"}, ["nea"] = {"Eastern Ngad'a"}, ["neb"] = {"Toura (Côte d'Ivoire)"}, ["nec"] = {"Nedebang"}, ["ned"] = {"Nde-Gbite"}, ["nee"] = {"Nêlêmwa-Nixumwak"}, ["nef"] = {"Nefamese"}, ["neg"] = {"Negidal"}, ["neh"] = {"Nyenkha"}, ["nei"] = {"Neo-Hittite"}, ["nej"] = {"Neko"}, ["nek"] = {"Neku"}, ["nem"] = {"Nemi"}, ["nen"] = {"Nengone"}, ["neo"] = {"Ná-Meo"}, ["neq"] = {"North Central Mixe"}, ["ner"] = {"Yahadian"}, ["nes"] = {"Bhoti Kinnauri"}, ["net"] = {"Nete"}, ["neu"] = {"Neo"}, ["nev"] = {"Nyaheun"}, ["new"] = {"Newari", "Nepal Bhasa"}, ["nex"] = {"Neme"}, ["ney"] = {"Neyo"}, ["nez"] = {"Nez Perce"}, ["nfa"] = {"Dhao"}, ["nfd"] = {"Ahwai"}, ["nfl"] = {"Ayiwo", "Äiwoo"}, ["nfr"] = {"Nafaanra"}, ["nfu"] = {"Mfumte"}, ["nga"] = {"Ngbaka"}, ["ngb"] = {"Northern Ngbandi"}, ["ngc"] = {"Ngombe (Democratic Republic of Congo)"}, ["ngd"] = {"Ngando (Central African Republic)"}, ["nge"] = {"Ngemba"}, ["ngf"] = {"Trans-New Guinea languages"}, ["ngg"] = {"Ngbaka Manza"}, ["ngh"] = {"Nǁng"}, ["ngi"] = {"Ngizim"}, ["ngj"] = {"Ngie"}, ["ngk"] = {"Dalabon"}, ["ngl"] = {"Lomwe"}, ["ngm"] = {"Ngatik Men's Creole"}, ["ngn"] = {"Ngwo"}, ["ngp"] = {"Ngulu"}, ["ngq"] = {"Ngurimi", "Ngoreme"}, ["ngr"] = {"Engdewu"}, ["ngs"] = {"Gvoko"}, ["ngt"] = {"Kriang", "Ngeq"}, ["ngu"] = {"Guerrero Nahuatl"}, ["ngv"] = {"Nagumi"}, ["ngw"] = {"Ngwaba"}, ["ngx"] = {"Nggwahyi"}, ["ngy"] = {"Tibea"}, ["ngz"] = {"Ngungwel"}, ["nha"] = {"Nhanda"}, ["nhb"] = {"Beng"}, ["nhc"] = {"Tabasco Nahuatl"}, ["nhd"] = {"Chiripá", "Ava Guaraní"}, ["nhe"] = {"Eastern Huasteca Nahuatl"}, ["nhf"] = {"Nhuwala"}, ["nhg"] = {"Tetelcingo Nahuatl"}, ["nhh"] = {"Nahari"}, ["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"}, ["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"}, ["nhm"] = {"Morelos Nahuatl"}, ["nhn"] = {"Central Nahuatl"}, ["nho"] = {"Takuu"}, ["nhp"] = {"Isthmus-Pajapan Nahuatl"}, ["nhq"] = {"Huaxcaleca Nahuatl"}, ["nhr"] = {"Naro"}, ["nht"] = {"Ometepec Nahuatl"}, ["nhu"] = {"Noone"}, ["nhv"] = {"Temascaltepec Nahuatl"}, ["nhw"] = {"Western Huasteca Nahuatl"}, ["nhx"] = {"Isthmus-Mecayapan Nahuatl"}, ["nhy"] = {"Northern Oaxaca Nahuatl"}, ["nhz"] = {"Santa María La Alta Nahuatl"}, ["nia"] = {"Nias"}, ["nib"] = {"Nakame"}, ["nic"] = {"Niger-Kordofanian languages"}, ["nid"] = {"Ngandi"}, ["nie"] = {"Niellim"}, ["nif"] = {"Nek"}, ["nig"] = {"Ngalakgan"}, ["nih"] = {"Nyiha (Tanzania)"}, ["nii"] = {"Nii"}, ["nij"] = {"Ngaju"}, ["nik"] = {"Southern Nicobarese"}, ["nil"] = {"Nila"}, ["nim"] = {"Nilamba"}, ["nin"] = {"Ninzo"}, ["nio"] = {"Nganasan"}, ["niq"] = {"Nandi"}, ["nir"] = {"Nimboran"}, ["nis"] = {"Nimi"}, ["nit"] = {"Southeastern Kolami"}, ["niu"] = {"Niuean"}, ["niv"] = {"Gilyak"}, ["niw"] = {"Nimo"}, ["nix"] = {"Hema"}, ["niy"] = {"Ngiti"}, ["niz"] = {"Ningil"}, ["nja"] = {"Nzanyi"}, ["njb"] = {"Nocte Naga"}, ["njd"] = {"Ndonde Hamba"}, ["njh"] = {"Lotha Naga"}, ["nji"] = {"Gudanji"}, ["njj"] = {"Njen"}, ["njl"] = {"Njalgulgule"}, ["njm"] = {"Angami Naga"}, ["njn"] = {"Liangmai Naga"}, ["njo"] = {"Ao Naga"}, ["njr"] = {"Njerep"}, ["njs"] = {"Nisa"}, ["njt"] = {"Ndyuka-Trio Pidgin"}, ["nju"] = {"Ngadjunmaya"}, ["njx"] = {"Kunyi"}, ["njy"] = {"Njyem"}, ["njz"] = {"Nyishi"}, ["nka"] = {"Nkoya"}, ["nkb"] = {"Khoibu Naga"}, ["nkc"] = {"Nkongho"}, ["nkd"] = {"Koireng"}, ["nke"] = {"Duke"}, ["nkf"] = {"Inpui Naga"}, ["nkg"] = {"Nekgini"}, ["nkh"] = {"Khezha Naga"}, ["nki"] = {"Thangal Naga"}, ["nkj"] = {"Nakai"}, ["nkk"] = {"Nokuku"}, ["nkm"] = {"Namat"}, ["nkn"] = {"Nkangala"}, ["nko"] = {"Nkonya"}, ["nkp"] = {"Niuatoputapu"}, ["nkq"] = {"Nkami"}, ["nkr"] = {"Nukuoro"}, ["nks"] = {"North Asmat"}, ["nkt"] = {"Nyika (Tanzania)"}, ["nku"] = {"Bouna Kulango"}, ["nkv"] = {"Nyika (Malawi and Zambia)"}, ["nkw"] = {"Nkutu"}, ["nkx"] = {"Nkoroo"}, ["nkz"] = {"Nkari"}, ["nla"] = {"Ngombale"}, ["nlc"] = {"Nalca"}, ["nle"] = {"East Nyala"}, ["nlg"] = {"Gela"}, ["nli"] = {"Grangali"}, ["nlj"] = {"Nyali"}, ["nlk"] = {"Ninia Yali"}, ["nll"] = {"Nihali"}, ["nlm"] = {"Mankiyali"}, ["nlo"] = {"Ngul"}, ["nlq"] = {"Lao Naga"}, ["nlu"] = {"Nchumbulu"}, ["nlv"] = {"Orizaba Nahuatl"}, ["nlw"] = {"Walangama"}, ["nlx"] = {"Nahali"}, ["nly"] = {"Nyamal"}, ["nlz"] = {"Nalögo"}, ["nma"] = {"Maram Naga"}, ["nmb"] = {"Big Nambas", "V'ënen Taut"}, ["nmc"] = {"Ngam"}, ["nmd"] = {"Ndumu"}, ["nme"] = {"Mzieme Naga"}, ["nmf"] = {"Tangkhul Naga (India)"}, ["nmg"] = {"Kwasio"}, ["nmh"] = {"Monsang Naga"}, ["nmi"] = {"Nyam"}, ["nmj"] = {"Ngombe (Central African Republic)"}, ["nmk"] = {"Namakura"}, ["nml"] = {"Ndemli"}, ["nmm"] = {"Manangba"}, ["nmn"] = {"ǃXóõ"}, ["nmo"] = {"Moyon Naga"}, ["nmp"] = {"Nimanbur"}, ["nmq"] = {"Nambya"}, ["nmr"] = {"Nimbari"}, ["nms"] = {"Letemboi"}, ["nmt"] = {"Namonuito"}, ["nmu"] = {"Northeast Maidu"}, ["nmv"] = {"Ngamini"}, ["nmw"] = {"Nimoa", "Rifao"}, ["nmx"] = {"Nama (Papua New Guinea)"}, ["nmy"] = {"Namuyi"}, ["nmz"] = {"Nawdm"}, ["nna"] = {"Nyangumarta"}, ["nnb"] = {"Nande"}, ["nnc"] = {"Nancere"}, ["nnd"] = {"West Ambae"}, ["nne"] = {"Ngandyera"}, ["nnf"] = {"Ngaing"}, ["nng"] = {"Maring Naga"}, ["nnh"] = {"Ngiemboon"}, ["nni"] = {"North Nuaulu"}, ["nnj"] = {"Nyangatom"}, ["nnk"] = {"Nankina"}, ["nnl"] = {"Northern Rengma Naga"}, ["nnm"] = {"Namia"}, ["nnn"] = {"Ngete"}, ["nnp"] = {"Wancho Naga"}, ["nnq"] = {"Ngindo"}, ["nnr"] = {"Narungga"}, ["nnt"] = {"Nanticoke"}, ["nnu"] = {"Dwang"}, ["nnv"] = {"Nugunu (Australia)"}, ["nnw"] = {"Southern Nuni"}, ["nny"] = {"Nyangga"}, ["nnz"] = {"Nda'nda'"}, ["noa"] = {"Woun Meu"}, ["noc"] = {"Nuk"}, ["nod"] = {"Northern Thai"}, ["noe"] = {"Nimadi"}, ["nof"] = {"Nomane"}, ["nog"] = {"Nogai"}, ["noh"] = {"Nomu"}, ["noi"] = {"Noiri"}, ["noj"] = {"Nonuya"}, ["nok"] = {"Nooksack"}, ["nol"] = {"Nomlaki"}, ["non"] = {"Old Norse"}, ["nop"] = {"Numanggang"}, ["noq"] = {"Ngongo"}, ["nos"] = {"Eastern Nisu"}, ["not"] = {"Nomatsiguenga"}, ["nou"] = {"Ewage-Notu"}, ["nov"] = {"Novial"}, ["now"] = {"Nyambo"}, ["noy"] = {"Noy"}, ["noz"] = {"Nayi"}, ["npa"] = {"Nar Phu"}, ["npb"] = {"Nupbikha"}, ["npg"] = {"Ponyo-Gongwang Naga"}, ["nph"] = {"Phom Naga"}, ["npi"] = {"Nepali (individual language)"}, ["npl"] = {"Southeastern Puebla Nahuatl"}, ["npn"] = {"Mondropolon"}, ["npo"] = {"Pochuri Naga"}, ["nps"] = {"Nipsan"}, ["npu"] = {"Puimei Naga"}, ["npx"] = {"Noipx"}, ["npy"] = {"Napu"}, ["nqg"] = {"Southern Nago"}, ["nqk"] = {"Kura Ede Nago"}, ["nql"] = {"Ngendelengo"}, ["nqm"] = {"Ndom"}, ["nqn"] = {"Nen"}, ["nqo"] = {"N'Ko", "N’Ko"}, ["nqq"] = {"Kyan-Karyaw Naga"}, ["nqt"] = {"Nteng"}, ["nqy"] = {"Akyaung Ari Naga"}, ["nra"] = {"Ngom"}, ["nrb"] = {"Nara"}, ["nrc"] = {"Noric"}, ["nre"] = {"Southern Rengma Naga"}, ["nrf"] = {"Jèrriais", "Guernésiais", "Sercquiais"}, ["nrg"] = {"Narango"}, ["nri"] = {"Chokri Naga"}, ["nrk"] = {"Ngarla"}, ["nrl"] = {"Ngarluma"}, ["nrm"] = {"Narom"}, ["nrn"] = {"Norn"}, ["nrp"] = {"North Picene"}, ["nrr"] = {"Norra", "Nora"}, ["nrt"] = {"Northern Kalapuya"}, ["nru"] = {"Narua"}, ["nrx"] = {"Ngurmbur"}, ["nrz"] = {"Lala"}, ["nsa"] = {"Sangtam Naga"}, ["nsb"] = {"Lower Nossob"}, ["nsc"] = {"Nshi"}, ["nsd"] = {"Southern Nisu"}, ["nse"] = {"Nsenga"}, ["nsf"] = {"Northwestern Nisu"}, ["nsg"] = {"Ngasa"}, ["nsh"] = {"Ngoshie"}, ["nsi"] = {"Nigerian Sign Language"}, ["nsk"] = {"Naskapi"}, ["nsl"] = {"Norwegian Sign Language"}, ["nsm"] = {"Sumi Naga"}, ["nsn"] = {"Nehan"}, ["nso"] = {"Pedi", "Northern Sotho", "Sepedi"}, ["nsp"] = {"Nepalese Sign Language"}, ["nsq"] = {"Northern Sierra Miwok"}, ["nsr"] = {"Maritime Sign Language"}, ["nss"] = {"Nali"}, ["nst"] = {"Tase Naga"}, ["nsu"] = {"Sierra Negra Nahuatl"}, ["nsv"] = {"Southwestern Nisu"}, ["nsw"] = {"Navut"}, ["nsx"] = {"Nsongo"}, ["nsy"] = {"Nasal"}, ["nsz"] = {"Nisenan"}, ["ntd"] = {"Northern Tidung"}, ["nte"] = {"Nathembo"}, ["ntg"] = {"Ngantangarra"}, ["nti"] = {"Natioro"}, ["ntj"] = {"Ngaanyatjarra"}, ["ntk"] = {"Ikoma-Nata-Isenye"}, ["ntm"] = {"Nateni"}, ["nto"] = {"Ntomba"}, ["ntp"] = {"Northern Tepehuan"}, ["ntr"] = {"Delo"}, ["ntu"] = {"Natügu"}, ["ntw"] = {"Nottoway"}, ["ntx"] = {"Tangkhul Naga (Myanmar)"}, ["nty"] = {"Mantsi"}, ["ntz"] = {"Natanzi"}, ["nua"] = {"Yuanga"}, ["nub"] = {"Nubian languages"}, ["nuc"] = {"Nukuini"}, ["nud"] = {"Ngala"}, ["nue"] = {"Ngundu"}, ["nuf"] = {"Nusu"}, ["nug"] = {"Nungali"}, ["nuh"] = {"Ndunda"}, ["nui"] = {"Ngumbi"}, ["nuj"] = {"Nyole"}, ["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"}, ["nul"] = {"Nusa Laut"}, ["num"] = {"Niuafo'ou"}, ["nun"] = {"Anong"}, ["nuo"] = {"Nguôn"}, ["nup"] = {"Nupe-Nupe-Tako"}, ["nuq"] = {"Nukumanu"}, ["nur"] = {"Nukuria"}, ["nus"] = {"Nuer"}, ["nut"] = {"Nung (Viet Nam)"}, ["nuu"] = {"Ngbundu"}, ["nuv"] = {"Northern Nuni"}, ["nuw"] = {"Nguluwan"}, ["nux"] = {"Mehek"}, ["nuy"] = {"Nunggubuyu"}, ["nuz"] = {"Tlamacazapa Nahuatl"}, ["nvh"] = {"Nasarian"}, ["nvm"] = {"Namiae"}, ["nvo"] = {"Nyokon"}, ["nwa"] = {"Nawathinehena"}, ["nwb"] = {"Nyabwa"}, ["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"}, ["nwe"] = {"Ngwe"}, ["nwg"] = {"Ngayawung"}, ["nwi"] = {"Southwest Tanna"}, ["nwm"] = {"Nyamusa-Molo"}, ["nwo"] = {"Nauo"}, ["nwr"] = {"Nawaru"}, ["nww"] = {"Ndwewe"}, ["nwx"] = {"Middle Newar"}, ["nwy"] = {"Nottoway-Meherrin"}, ["nxa"] = {"Nauete"}, ["nxd"] = {"Ngando (Democratic Republic of Congo)"}, ["nxe"] = {"Nage"}, ["nxg"] = {"Ngad'a"}, ["nxi"] = {"Nindi"}, ["nxk"] = {"Koki Naga"}, ["nxl"] = {"South Nuaulu"}, ["nxm"] = {"Numidian"}, ["nxn"] = {"Ngawun"}, ["nxo"] = {"Ndambomo"}, ["nxq"] = {"Naxi"}, ["nxr"] = {"Ninggerum"}, ["nxx"] = {"Nafri"}, ["nyb"] = {"Nyangbo"}, ["nyc"] = {"Nyanga-li"}, ["nyd"] = {"Nyore", "Olunyole"}, ["nye"] = {"Nyengo"}, ["nyf"] = {"Giryama", "Kigiryama"}, ["nyg"] = {"Nyindu"}, ["nyh"] = {"Nyikina"}, ["nyi"] = {"Ama (Sudan)"}, ["nyj"] = {"Nyanga"}, ["nyk"] = {"Nyaneka"}, ["nyl"] = {"Nyeu"}, ["nym"] = {"Nyamwezi"}, ["nyn"] = {"Nyankole"}, ["nyo"] = {"Nyoro"}, ["nyp"] = {"Nyang'i"}, ["nyq"] = {"Nayini"}, ["nyr"] = {"Nyiha (Malawi)"}, ["nys"] = {"Nyungar"}, ["nyt"] = {"Nyawaygi"}, ["nyu"] = {"Nyungwe"}, ["nyv"] = {"Nyulnyul"}, ["nyw"] = {"Nyaw"}, ["nyx"] = {"Nganyaywana"}, ["nyy"] = {"Nyakyusa-Ngonde"}, ["nza"] = {"Tigon Mbembe"}, ["nzb"] = {"Njebi"}, ["nzd"] = {"Nzadi"}, ["nzi"] = {"Nzima"}, ["nzk"] = {"Nzakara"}, ["nzm"] = {"Zeme Naga"}, ["nzr"] = {"Dir-Nyamzak-Mbarimi"}, ["nzs"] = {"New Zealand Sign Language"}, ["nzu"] = {"Teke-Nzikou"}, ["nzy"] = {"Nzakambay"}, ["nzz"] = {"Nanga Dama Dogon"}, ["oaa"] = {"Orok"}, ["oac"] = {"Oroch"}, ["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"}, ["oav"] = {"Old Avar"}, ["obi"] = {"Obispeño"}, ["obk"] = {"Southern Bontok"}, ["obl"] = {"Oblo"}, ["obm"] = {"Moabite"}, ["obo"] = {"Obo Manobo"}, ["obr"] = {"Old Burmese"}, ["obt"] = {"Old Breton"}, ["obu"] = {"Obulom"}, ["oca"] = {"Ocaina"}, ["och"] = {"Old Chinese"}, ["ocm"] = {"Old Cham"}, ["oco"] = {"Old Cornish"}, ["ocu"] = {"Atzingo Matlatzinca"}, ["oda"] = {"Odut"}, ["odk"] = {"Od"}, ["odt"] = {"Old Dutch"}, ["odu"] = {"Odual"}, ["ofo"] = {"Ofo"}, ["ofs"] = {"Old Frisian"}, ["ofu"] = {"Efutop"}, ["ogb"] = {"Ogbia"}, ["ogc"] = {"Ogbah"}, ["oge"] = {"Old Georgian"}, ["ogg"] = {"Ogbogolo"}, ["ogo"] = {"Khana"}, ["ogu"] = {"Ogbronuagum"}, ["oht"] = {"Old Hittite"}, ["ohu"] = {"Old Hungarian"}, ["oia"] = {"Oirata"}, ["oie"] = {"Okolie"}, ["oin"] = {"Inebu One"}, ["ojb"] = {"Northwestern Ojibwa"}, ["ojc"] = {"Central Ojibwa"}, ["ojg"] = {"Eastern Ojibwa"}, ["ojp"] = {"Old Japanese"}, ["ojs"] = {"Severn Ojibwa"}, ["ojv"] = {"Ontong Java"}, ["ojw"] = {"Western Ojibwa"}, ["oka"] = {"Okanagan"}, ["okb"] = {"Okobo"}, ["okc"] = {"Kobo"}, ["okd"] = {"Okodia"}, ["oke"] = {"Okpe (Southwestern Edo)"}, ["okg"] = {"Koko Babangk"}, ["okh"] = {"Koresh-e Rostam"}, ["oki"] = {"Okiek"}, ["okj"] = {"Oko-Juwoi"}, ["okk"] = {"Kwamtim One"}, ["okl"] = {"Old Kentish Sign Language"}, ["okm"] = {"Middle Korean (10th-16th cent.)"}, ["okn"] = {"Oki-No-Erabu"}, ["oko"] = {"Old Korean (3rd-9th cent.)"}, ["okr"] = {"Kirike"}, ["oks"] = {"Oko-Eni-Osayen"}, ["oku"] = {"Oku"}, ["okv"] = {"Orokaiva"}, ["okx"] = {"Okpe (Northwestern Edo)"}, ["okz"] = {"Old Khmer"}, ["ola"] = {"Walungge"}, ["old"] = {"Mochi"}, ["ole"] = {"Olekha"}, ["olk"] = {"Olkol"}, ["olm"] = {"Oloma"}, ["olo"] = {"Livvi"}, ["olr"] = {"Olrat"}, ["olt"] = {"Old Lithuanian"}, ["olu"] = {"Kuvale"}, ["oma"] = {"Omaha-Ponca"}, ["omb"] = {"East Ambae"}, ["omc"] = {"Mochica"}, ["omg"] = {"Omagua"}, ["omi"] = {"Omi"}, ["omk"] = {"Omok"}, ["oml"] = {"Ombo"}, ["omn"] = {"Minoan"}, ["omo"] = {"Utarmbung"}, ["omp"] = {"Old Manipuri"}, ["omq"] = {"Oto-Manguean languages"}, ["omr"] = {"Old Marathi"}, ["omt"] = {"Omotik"}, ["omu"] = {"Omurano"}, ["omv"] = {"Omotic languages"}, ["omw"] = {"South Tairora"}, ["omx"] = {"Old Mon"}, ["omy"] = {"Old Malay"}, ["ona"] = {"Ona"}, ["onb"] = {"Lingao"}, ["one"] = {"Oneida"}, ["ong"] = {"Olo"}, ["oni"] = {"Onin"}, ["onj"] = {"Onjob"}, ["onk"] = {"Kabore One"}, ["onn"] = {"Onobasulu"}, ["ono"] = {"Onondaga"}, ["onp"] = {"Sartang"}, ["onr"] = {"Northern One"}, ["ons"] = {"Ono"}, ["ont"] = {"Ontenu"}, ["onu"] = {"Unua"}, ["onw"] = {"Old Nubian"}, ["onx"] = {"Onin Based Pidgin"}, ["ood"] = {"Tohono O'odham"}, ["oog"] = {"Ong"}, ["oon"] = {"Önge"}, ["oor"] = {"Oorlams"}, ["oos"] = {"Old Ossetic"}, ["opa"] = {"Okpamheri"}, ["opk"] = {"Kopkaka"}, ["opm"] = {"Oksapmin"}, ["opo"] = {"Opao"}, ["opt"] = {"Opata"}, ["opy"] = {"Ofayé"}, ["ora"] = {"Oroha"}, ["orc"] = {"Orma"}, ["ore"] = {"Orejón"}, ["org"] = {"Oring"}, ["orh"] = {"Oroqen"}, ["orn"] = {"Orang Kanaq"}, ["oro"] = {"Orokolo"}, ["orr"] = {"Oruma"}, ["ors"] = {"Orang Seletar"}, ["ort"] = {"Adivasi Oriya"}, ["oru"] = {"Ormuri"}, ["orv"] = {"Old Russian"}, ["orw"] = {"Oro Win"}, ["orx"] = {"Oro"}, ["ory"] = {"Odia (individual language)", "Oriya (individual language)"}, ["orz"] = {"Ormu"}, ["osa"] = {"Osage"}, ["osc"] = {"Oscan"}, ["osi"] = {"Osing"}, ["osn"] = {"Old Sundanese"}, ["oso"] = {"Ososo"}, ["osp"] = {"Old Spanish"}, ["ost"] = {"Osatu"}, ["osu"] = {"Southern One"}, ["osx"] = {"Old Saxon"}, ["ota"] = {"Ottoman Turkish (1500-1928)"}, ["otb"] = {"Old Tibetan"}, ["otd"] = {"Ot Danum"}, ["ote"] = {"Mezquital Otomi"}, ["oti"] = {"Oti"}, ["otk"] = {"Old Turkish"}, ["otl"] = {"Tilapa Otomi"}, ["otm"] = {"Eastern Highland Otomi"}, ["otn"] = {"Tenango Otomi"}, ["oto"] = {"Otomian languages"}, ["otq"] = {"Querétaro Otomi"}, ["otr"] = {"Otoro"}, ["ots"] = {"Estado de México Otomi"}, ["ott"] = {"Temoaya Otomi"}, ["otu"] = {"Otuke"}, ["otw"] = {"Ottawa"}, ["otx"] = {"Texcatepec Otomi"}, ["oty"] = {"Old Tamil"}, ["otz"] = {"Ixtenco Otomi"}, ["oua"] = {"Tagargrent"}, ["oub"] = {"Glio-Oubi"}, ["oue"] = {"Oune"}, ["oui"] = {"Old Uighur"}, ["oum"] = {"Ouma"}, ["ovd"] = {"Elfdalian", "Övdalian"}, ["owi"] = {"Owiniga"}, ["owl"] = {"Old Welsh"}, ["oyb"] = {"Oy"}, ["oyd"] = {"Oyda"}, ["oym"] = {"Wayampi"}, ["oyy"] = {"Oya'oya"}, ["ozm"] = {"Koonzime"}, ["paa"] = {"Papuan languages"}, ["pab"] = {"Parecís"}, ["pac"] = {"Pacoh"}, ["pad"] = {"Paumarí"}, ["pae"] = {"Pagibete"}, ["paf"] = {"Paranawát"}, ["pag"] = {"Pangasinan"}, ["pah"] = {"Tenharim"}, ["pai"] = {"Pe"}, ["pak"] = {"Parakanã"}, ["pal"] = {"Pahlavi"}, ["pam"] = {"Pampanga", "Kapampangan"}, ["pao"] = {"Northern Paiute"}, ["pap"] = {"Papiamento"}, ["paq"] = {"Parya"}, ["par"] = {"Panamint", "Timbisha"}, ["pas"] = {"Papasena"}, ["pau"] = {"Palauan"}, ["pav"] = {"Pakaásnovos"}, ["paw"] = {"Pawnee"}, ["pax"] = {"Pankararé"}, ["pay"] = {"Pech"}, ["paz"] = {"Pankararú"}, ["pbb"] = {"Páez"}, ["pbc"] = {"Patamona"}, ["pbe"] = {"Mezontla Popoloca"}, ["pbf"] = {"Coyotepec Popoloca"}, ["pbg"] = {"Paraujano"}, ["pbh"] = {"E'ñapa Woromaipu"}, ["pbi"] = {"Parkwa"}, ["pbl"] = {"Mak (Nigeria)"}, ["pbm"] = {"Puebla Mazatec"}, ["pbn"] = {"Kpasam"}, ["pbo"] = {"Papel"}, ["pbp"] = {"Badyara"}, ["pbr"] = {"Pangwa"}, ["pbs"] = {"Central Pame"}, ["pbt"] = {"Southern Pashto"}, ["pbu"] = {"Northern Pashto"}, ["pbv"] = {"Pnar"}, ["pby"] = {"Pyu (Papua New Guinea)"}, ["pca"] = {"Santa Inés Ahuatempan Popoloca"}, ["pcb"] = {"Pear"}, ["pcc"] = {"Bouyei"}, ["pcd"] = {"Picard"}, ["pce"] = {"Ruching Palaung"}, ["pcf"] = {"Paliyan"}, ["pcg"] = {"Paniya"}, ["pch"] = {"Pardhan"}, ["pci"] = {"Duruwa"}, ["pcj"] = {"Parenga"}, ["pck"] = {"Paite Chin"}, ["pcl"] = {"Pardhi"}, ["pcm"] = {"Nigerian Pidgin"}, ["pcn"] = {"Piti"}, ["pcp"] = {"Pacahuara"}, ["pcw"] = {"Pyapun"}, ["pda"] = {"Anam"}, ["pdc"] = {"Pennsylvania German"}, ["pdi"] = {"Pa Di"}, ["pdn"] = {"Podena", "Fedan"}, ["pdo"] = {"Padoe"}, ["pdt"] = {"Plautdietsch"}, ["pdu"] = {"Kayan"}, ["pea"] = {"Peranakan Indonesian"}, ["peb"] = {"Eastern Pomo"}, ["ped"] = {"Mala (Papua New Guinea)"}, ["pee"] = {"Taje"}, ["pef"] = {"Northeastern Pomo"}, ["peg"] = {"Pengo"}, ["peh"] = {"Bonan"}, ["pei"] = {"Chichimeca-Jonaz"}, ["pej"] = {"Northern Pomo"}, ["pek"] = {"Penchal"}, ["pel"] = {"Pekal"}, ["pem"] = {"Phende"}, ["peo"] = {"Old Persian (ca. 600-400 B.C.)"}, ["pep"] = {"Kunja"}, ["peq"] = {"Southern Pomo"}, ["pes"] = {"Iranian Persian"}, ["pev"] = {"Pémono"}, ["pex"] = {"Petats"}, ["pey"] = {"Petjo"}, ["pez"] = {"Eastern Penan"}, ["pfa"] = {"Pááfang"}, ["pfe"] = {"Pere"}, ["pfl"] = {"Pfaelzisch"}, ["pga"] = {"Sudanese Creole Arabic"}, ["pgd"] = {"Gāndhārī"}, ["pgg"] = {"Pangwali"}, ["pgi"] = {"Pagi"}, ["pgk"] = {"Rerep"}, ["pgl"] = {"Primitive Irish"}, ["pgn"] = {"Paelignian"}, ["pgs"] = {"Pangseng"}, ["pgu"] = {"Pagu"}, ["pgz"] = {"Papua New Guinean Sign Language"}, ["pha"] = {"Pa-Hng"}, ["phd"] = {"Phudagi"}, ["phg"] = {"Phuong"}, ["phh"] = {"Phukha"}, ["phi"] = {"Philippine languages"}, ["phj"] = {"Pahari"}, ["phk"] = {"Phake"}, ["phl"] = {"Phalura", "Palula"}, ["phm"] = {"Phimbi"}, ["phn"] = {"Phoenician"}, ["pho"] = {"Phunoi"}, ["phq"] = {"Phana'"}, ["phr"] = {"Pahari-Potwari"}, ["pht"] = {"Phu Thai"}, ["phu"] = {"Phuan"}, ["phv"] = {"Pahlavani"}, ["phw"] = {"Phangduwali"}, ["pia"] = {"Pima Bajo"}, ["pib"] = {"Yine"}, ["pic"] = {"Pinji"}, ["pid"] = {"Piaroa"}, ["pie"] = {"Piro"}, ["pif"] = {"Pingelapese"}, ["pig"] = {"Pisabo"}, ["pih"] = {"Pitcairn-Norfolk"}, ["pij"] = {"Pijao"}, ["pil"] = {"Yom"}, ["pim"] = {"Powhatan"}, ["pin"] = {"Piame"}, ["pio"] = {"Piapoco"}, ["pip"] = {"Pero"}, ["pir"] = {"Piratapuyo"}, ["pis"] = {"Pijin"}, ["pit"] = {"Pitta Pitta"}, ["piu"] = {"Pintupi-Luritja"}, ["piv"] = {"Pileni", "Vaeakau-Taumako"}, ["piw"] = {"Pimbwe"}, ["pix"] = {"Piu"}, ["piy"] = {"Piya-Kwonci"}, ["piz"] = {"Pije"}, ["pjt"] = {"Pitjantjatjara"}, ["pka"] = {"Ardhamāgadhī Prākrit"}, ["pkb"] = {"Pokomo", "Kipfokomo"}, ["pkc"] = {"Paekche"}, ["pkg"] = {"Pak-Tong"}, ["pkh"] = {"Pankhu"}, ["pkn"] = {"Pakanha"}, ["pko"] = {"Pökoot"}, ["pkp"] = {"Pukapuka"}, ["pkr"] = {"Attapady Kurumba"}, ["pks"] = {"Pakistan Sign Language"}, ["pkt"] = {"Maleng"}, ["pku"] = {"Paku"}, ["pla"] = {"Miani"}, ["plb"] = {"Polonombauk"}, ["plc"] = {"Central Palawano"}, ["pld"] = {"Polari"}, ["ple"] = {"Palu'e"}, ["plf"] = {"Central Malayo-Polynesian languages"}, ["plg"] = {"Pilagá"}, ["plh"] = {"Paulohi"}, ["plk"] = {"Kohistani Shina"}, ["pll"] = {"Shwe Palaung"}, ["pln"] = {"Palenquero"}, ["plo"] = {"Oluta Popoluca"}, ["plq"] = {"Palaic"}, ["plr"] = {"Palaka Senoufo"}, ["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"}, ["plt"] = {"Plateau Malagasy"}, ["plu"] = {"Palikúr"}, ["plv"] = {"Southwest Palawano"}, ["plw"] = {"Brooke's Point Palawano"}, ["ply"] = {"Bolyu"}, ["plz"] = {"Paluan"}, ["pma"] = {"Paama"}, ["pmb"] = {"Pambia"}, ["pmd"] = {"Pallanganmiddang"}, ["pme"] = {"Pwaamei"}, ["pmf"] = {"Pamona"}, ["pmh"] = {"Māhārāṣṭri Prākrit"}, ["pmi"] = {"Northern Pumi"}, ["pmj"] = {"Southern Pumi"}, ["pml"] = {"Lingua Franca"}, ["pmm"] = {"Pomo"}, ["pmn"] = {"Pam"}, ["pmo"] = {"Pom"}, ["pmq"] = {"Northern Pame"}, ["pmr"] = {"Paynamar"}, ["pms"] = {"Piemontese"}, ["pmt"] = {"Tuamotuan"}, ["pmw"] = {"Plains Miwok"}, ["pmx"] = {"Poumei Naga"}, ["pmy"] = {"Papuan Malay"}, ["pmz"] = {"Southern Pame"}, ["pna"] = {"Punan Bah-Biau"}, ["pnb"] = {"Western Panjabi"}, ["pnc"] = {"Pannei"}, ["pnd"] = {"Mpinda"}, ["pne"] = {"Western Penan"}, ["png"] = {"Pangu", "Pongu"}, ["pnh"] = {"Penrhyn"}, ["pni"] = {"Aoheng"}, ["pnj"] = {"Pinjarup"}, ["pnk"] = {"Paunaka"}, ["pnl"] = {"Paleni"}, ["pnm"] = {"Punan Batu 1"}, ["pnn"] = {"Pinai-Hagahai"}, ["pno"] = {"Panobo"}, ["pnp"] = {"Pancana"}, ["pnq"] = {"Pana (Burkina Faso)"}, ["pnr"] = {"Panim"}, ["pns"] = {"Ponosakan"}, ["pnt"] = {"Pontic"}, ["pnu"] = {"Jiongnai Bunu"}, ["pnv"] = {"Pinigura"}, ["pnw"] = {"Banyjima", "Panytyima"}, ["pnx"] = {"Phong-Kniang"}, ["pny"] = {"Pinyin"}, ["pnz"] = {"Pana (Central African Republic)"}, ["poc"] = {"Poqomam"}, ["poe"] = {"San Juan Atzingo Popoloca"}, ["pof"] = {"Poke"}, ["pog"] = {"Potiguára"}, ["poh"] = {"Poqomchi'"}, ["poi"] = {"Highland Popoluca"}, ["pok"] = {"Pokangá"}, ["pom"] = {"Southeastern Pomo"}, ["pon"] = {"Pohnpeian"}, ["poo"] = {"Central Pomo"}, ["pop"] = {"Pwapwâ"}, ["poq"] = {"Texistepec Popoluca"}, ["pos"] = {"Sayula Popoluca"}, ["pot"] = {"Potawatomi"}, ["pov"] = {"Upper Guinea Crioulo"}, ["pow"] = {"San Felipe Otlaltepec Popoloca"}, ["pox"] = {"Polabian"}, ["poy"] = {"Pogolo"}, ["poz"] = {"Malayo-Polynesian languages"}, ["ppe"] = {"Papi"}, ["ppi"] = {"Paipai"}, ["ppk"] = {"Uma"}, ["ppl"] = {"Pipil", "Nicarao"}, ["ppm"] = {"Papuma"}, ["ppn"] = {"Papapana"}, ["ppo"] = {"Folopa"}, ["ppp"] = {"Pelende"}, ["ppq"] = {"Pei"}, ["pps"] = {"San Luís Temalacayuca Popoloca"}, ["ppt"] = {"Pare"}, ["ppu"] = {"Papora"}, ["pqa"] = {"Pa'a"}, ["pqe"] = {"Eastern Malayo-Polynesian languages"}, ["pqm"] = {"Malecite-Passamaquoddy"}, ["pqw"] = {"Western Malayo-Polynesian languages"}, ["pra"] = {"Prakrit languages"}, ["prc"] = {"Parachi"}, ["prd"] = {"Parsi-Dari"}, ["pre"] = {"Principense"}, ["prf"] = {"Paranan"}, ["prg"] = {"Prussian"}, ["prh"] = {"Porohanon"}, ["pri"] = {"Paicî"}, ["prk"] = {"Parauk"}, ["prl"] = {"Peruvian Sign Language"}, ["prm"] = {"Kibiri"}, ["prn"] = {"Prasuni"}, ["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"}, ["prq"] = {"Ashéninka Perené"}, ["prr"] = {"Puri"}, ["prs"] = {"Dari", "Afghan Persian"}, ["prt"] = {"Phai"}, ["pru"] = {"Puragi"}, ["prw"] = {"Parawen"}, ["prx"] = {"Purik"}, ["prz"] = {"Providencia Sign Language"}, ["psa"] = {"Asue Awyu"}, ["psc"] = {"Iranian Sign Language", "Persian Sign Language"}, ["psd"] = {"Plains Indian Sign Language"}, ["pse"] = {"Central Malay"}, ["psg"] = {"Penang Sign Language"}, ["psh"] = {"Southwest Pashai", "Southwest Pashayi"}, ["psi"] = {"Southeast Pashai", "Southeast Pashayi"}, ["psl"] = {"Puerto Rican Sign Language"}, ["psm"] = {"Pauserna"}, ["psn"] = {"Panasuan"}, ["pso"] = {"Polish Sign Language"}, ["psp"] = {"Philippine Sign Language"}, ["psq"] = {"Pasi"}, ["psr"] = {"Portuguese Sign Language"}, ["pss"] = {"Kaulong"}, ["pst"] = {"Central Pashto"}, ["psu"] = {"Sauraseni Prākrit"}, ["psw"] = {"Port Sandwich"}, ["psy"] = {"Piscataway"}, ["pta"] = {"Pai Tavytera"}, ["pth"] = {"Pataxó Hã-Ha-Hãe"}, ["pti"] = {"Pindiini", "Wangkatha"}, ["ptn"] = {"Patani"}, ["pto"] = {"Zo'é"}, ["ptp"] = {"Patep"}, ["ptq"] = {"Pattapu"}, ["ptr"] = {"Piamatsina"}, ["ptt"] = {"Enrekang"}, ["ptu"] = {"Bambam"}, ["ptv"] = {"Port Vato"}, ["ptw"] = {"Pentlatch"}, ["pty"] = {"Pathiya"}, ["pua"] = {"Western Highland Purepecha"}, ["pub"] = {"Purum"}, ["puc"] = {"Punan Merap"}, ["pud"] = {"Punan Aput"}, ["pue"] = {"Puelche"}, ["puf"] = {"Punan Merah"}, ["pug"] = {"Phuie"}, ["pui"] = {"Puinave"}, ["puj"] = {"Punan Tubu"}, ["pum"] = {"Puma"}, ["puo"] = {"Puoc"}, ["pup"] = {"Pulabu"}, ["puq"] = {"Puquina"}, ["pur"] = {"Puruborá"}, ["put"] = {"Putoh"}, ["puu"] = {"Punu"}, ["puw"] = {"Puluwatese"}, ["pux"] = {"Puare"}, ["puy"] = {"Purisimeño"}, ["pwa"] = {"Pawaia"}, ["pwb"] = {"Panawa"}, ["pwg"] = {"Gapapaiwa"}, ["pwi"] = {"Patwin"}, ["pwm"] = {"Molbog"}, ["pwn"] = {"Paiwan"}, ["pwo"] = {"Pwo Western Karen"}, ["pwr"] = {"Powari"}, ["pww"] = {"Pwo Northern Karen"}, ["pxm"] = {"Quetzaltepec Mixe"}, ["pye"] = {"Pye Krumen"}, ["pym"] = {"Fyam"}, ["pyn"] = {"Poyanáwa"}, ["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"}, ["pyu"] = {"Puyuma"}, ["pyx"] = {"Pyu (Myanmar)"}, ["pyy"] = {"Pyen"}, ["pze"] = {"Pesse"}, ["pzh"] = {"Pazeh"}, ["pzn"] = {"Jejara Naga", "Para Naga"}, ["qua"] = {"Quapaw"}, ["qub"] = {"Huallaga Huánuco Quechua"}, ["quc"] = {"K'iche'", "Quiché"}, ["qud"] = {"Calderón Highland Quichua"}, ["quf"] = {"Lambayeque Quechua"}, ["qug"] = {"Chimborazo Highland Quichua"}, ["quh"] = {"South Bolivian Quechua"}, ["qui"] = {"Quileute"}, ["quk"] = {"Chachapoyas Quechua"}, ["qul"] = {"North Bolivian Quechua"}, ["qum"] = {"Sipacapense"}, ["qun"] = {"Quinault"}, ["qup"] = {"Southern Pastaza Quechua"}, ["quq"] = {"Quinqui"}, ["qur"] = {"Yanahuanca Pasco Quechua"}, ["qus"] = {"Santiago del Estero Quichua"}, ["quv"] = {"Sacapulteco"}, ["quw"] = {"Tena Lowland Quichua"}, ["qux"] = {"Yauyos Quechua"}, ["quy"] = {"Ayacucho Quechua"}, ["quz"] = {"Cusco Quechua"}, ["qva"] = {"Ambo-Pasco Quechua"}, ["qvc"] = {"Cajamarca Quechua"}, ["qve"] = {"Eastern Apurímac Quechua"}, ["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"}, ["qvi"] = {"Imbabura Highland Quichua"}, ["qvj"] = {"Loja Highland Quichua"}, ["qvl"] = {"Cajatambo North Lima Quechua"}, ["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"}, ["qvn"] = {"North Junín Quechua"}, ["qvo"] = {"Napo Lowland Quechua"}, ["qvp"] = {"Pacaraos Quechua"}, ["qvs"] = {"San Martín Quechua"}, ["qvw"] = {"Huaylla Wanca Quechua"}, ["qvy"] = {"Queyu"}, ["qvz"] = {"Northern Pastaza Quichua"}, ["qwa"] = {"Corongo Ancash Quechua"}, ["qwc"] = {"Classical Quechua"}, ["qwe"] = {"Quechuan (family)"}, ["qwh"] = {"Huaylas Ancash Quechua"}, ["qwm"] = {"Kuman (Russia)"}, ["qws"] = {"Sihuas Ancash Quechua"}, ["qwt"] = {"Kwalhioqua-Tlatskanai"}, ["qxa"] = {"Chiquián Ancash Quechua"}, ["qxc"] = {"Chincha Quechua"}, ["qxh"] = {"Panao Huánuco Quechua"}, ["qxl"] = {"Salasaca Highland Quichua"}, ["qxn"] = {"Northern Conchucos Ancash Quechua"}, ["qxo"] = {"Southern Conchucos Ancash Quechua"}, ["qxp"] = {"Puno Quechua"}, ["qxq"] = {"Qashqa'i"}, ["qxr"] = {"Cañar Highland Quichua"}, ["qxs"] = {"Southern Qiang"}, ["qxt"] = {"Santa Ana de Tusi Pasco Quechua"}, ["qxu"] = {"Arequipa-La Unión Quechua"}, ["qxw"] = {"Jauja Wanca Quechua"}, ["qya"] = {"Quenya"}, ["qyp"] = {"Quiripi"}, ["raa"] = {"Dungmali"}, ["rab"] = {"Camling"}, ["rac"] = {"Rasawa"}, ["rad"] = {"Rade"}, ["raf"] = {"Western Meohang"}, ["rag"] = {"Logooli", "Lulogooli"}, ["rah"] = {"Rabha"}, ["rai"] = {"Ramoaaina"}, ["raj"] = {"Rajasthani"}, ["rak"] = {"Tulu-Bohuai"}, ["ral"] = {"Ralte"}, ["ram"] = {"Canela"}, ["ran"] = {"Riantana"}, ["rao"] = {"Rao"}, ["rap"] = {"Rapanui"}, ["raq"] = {"Saam"}, ["rar"] = {"Rarotongan", "Cook Islands Maori"}, ["ras"] = {"Tegali"}, ["rat"] = {"Razajerdi"}, ["rau"] = {"Raute"}, ["rav"] = {"Sampang"}, ["raw"] = {"Rawang"}, ["rax"] = {"Rang"}, ["ray"] = {"Rapa"}, ["raz"] = {"Rahambuu"}, ["rbb"] = {"Rumai Palaung"}, ["rbk"] = {"Northern Bontok"}, ["rbl"] = {"Miraya Bikol"}, ["rbp"] = {"Barababaraba"}, ["rcf"] = {"Réunion Creole French"}, ["rdb"] = {"Rudbari"}, ["rea"] = {"Rerau"}, ["reb"] = {"Rembong"}, ["ree"] = {"Rejang Kayan"}, ["reg"] = {"Kara (Tanzania)"}, ["rei"] = {"Reli"}, ["rej"] = {"Rejang"}, ["rel"] = {"Rendille"}, ["rem"] = {"Remo"}, ["ren"] = {"Rengao"}, ["rer"] = {"Rer Bare"}, ["res"] = {"Reshe"}, ["ret"] = {"Retta"}, ["rey"] = {"Reyesano"}, ["rga"] = {"Roria"}, ["rge"] = {"Romano-Greek"}, ["rgk"] = {"Rangkas"}, ["rgn"] = {"Romagnol"}, ["rgr"] = {"Resígaro"}, ["rgs"] = {"Southern Roglai"}, ["rgu"] = {"Ringgou"}, ["rhg"] = {"Rohingya"}, ["rhp"] = {"Yahang"}, ["ria"] = {"Riang (India)"}, ["rib"] = {"Bribri Sign Language"}, ["rif"] = {"Tarifit"}, ["ril"] = {"Riang Lang", "Riang (Myanmar)"}, ["rim"] = {"Nyaturu"}, ["rin"] = {"Nungu"}, ["rir"] = {"Ribun"}, ["rit"] = {"Ritharrngu"}, ["riu"] = {"Riung"}, ["rjg"] = {"Rajong"}, ["rji"] = {"Raji"}, ["rjs"] = {"Rajbanshi"}, ["rka"] = {"Kraol"}, ["rkb"] = {"Rikbaktsa"}, ["rkh"] = {"Rakahanga-Manihiki"}, ["rki"] = {"Rakhine"}, ["rkm"] = {"Marka"}, ["rkt"] = {"Rangpuri", "Kamta"}, ["rkw"] = {"Arakwal"}, ["rma"] = {"Rama"}, ["rmb"] = {"Rembarrnga"}, ["rmc"] = {"Carpathian Romani"}, ["rmd"] = {"Traveller Danish"}, ["rme"] = {"Angloromani"}, ["rmf"] = {"Kalo Finnish Romani"}, ["rmg"] = {"Traveller Norwegian"}, ["rmh"] = {"Murkim"}, ["rmi"] = {"Lomavren"}, ["rmk"] = {"Romkun"}, ["rml"] = {"Baltic Romani"}, ["rmm"] = {"Roma"}, ["rmn"] = {"Balkan Romani"}, ["rmo"] = {"Sinte Romani"}, ["rmp"] = {"Rempi"}, ["rmq"] = {"Caló"}, ["rms"] = {"Romanian Sign Language"}, ["rmt"] = {"Domari"}, ["rmu"] = {"Tavringer Romani"}, ["rmv"] = {"Romanova"}, ["rmw"] = {"Welsh Romani"}, ["rmx"] = {"Romam"}, ["rmy"] = {"Vlax Romani"}, ["rmz"] = {"Marma"}, ["rnb"] = {"Brunca Sign Language"}, ["rnd"] = {"Ruund"}, ["rng"] = {"Ronga"}, ["rnl"] = {"Ranglong"}, ["rnn"] = {"Roon"}, ["rnp"] = {"Rongpo"}, ["rnr"] = {"Nari Nari"}, ["rnw"] = {"Rungwa"}, ["roa"] = {"Romance languages"}, ["rob"] = {"Tae'"}, ["roc"] = {"Cacgia Roglai"}, ["rod"] = {"Rogo"}, ["roe"] = {"Ronji"}, ["rof"] = {"Rombo"}, ["rog"] = {"Northern Roglai"}, ["rol"] = {"Romblomanon"}, ["rom"] = {"Romany"}, ["roo"] = {"Rotokas"}, ["rop"] = {"Kriol"}, ["ror"] = {"Rongga"}, ["rou"] = {"Runga"}, ["row"] = {"Dela-Oenale"}, ["rpn"] = {"Repanbitip"}, ["rpt"] = {"Rapting"}, ["rri"] = {"Ririo"}, ["rro"] = {"Waima"}, ["rrt"] = {"Arritinngithigh"}, ["rsb"] = {"Romano-Serbian"}, ["rsk"] = {"Ruthenian", "Rusnak"}, ["rsl"] = {"Russian Sign Language"}, ["rsm"] = {"Miriwoong Sign Language"}, ["rsn"] = {"Rwandan Sign Language"}, ["rsw"] = {"Rishiwa"}, ["rtc"] = {"Rungtu Chin"}, ["rth"] = {"Ratahan"}, ["rtm"] = {"Rotuman"}, ["rts"] = {"Yurats"}, ["rtw"] = {"Rathawi"}, ["rub"] = {"Gungu"}, ["ruc"] = {"Ruuli"}, ["rue"] = {"Rusyn"}, ["ruf"] = {"Luguru"}, ["rug"] = {"Roviana"}, ["ruh"] = {"Ruga"}, ["rui"] = {"Rufiji"}, ["ruk"] = {"Che"}, ["ruo"] = {"Istro Romanian"}, ["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"}, ["ruq"] = {"Megleno Romanian"}, ["rut"] = {"Rutul"}, ["ruu"] = {"Lanas Lobu"}, ["ruy"] = {"Mala (Nigeria)"}, ["ruz"] = {"Ruma"}, ["rwa"] = {"Rawo"}, ["rwk"] = {"Rwa"}, ["rwl"] = {"Ruwila"}, ["rwm"] = {"Amba (Uganda)"}, ["rwo"] = {"Rawa"}, ["rwr"] = {"Marwari (India)"}, ["rxd"] = {"Ngardi"}, ["rxw"] = {"Karuwali", "Garuwali"}, ["ryn"] = {"Northern Amami-Oshima"}, ["rys"] = {"Yaeyama"}, ["ryu"] = {"Central Okinawan"}, ["rzh"] = {"Rāziḥī"}, ["saa"] = {"Saba"}, ["sab"] = {"Buglere"}, ["sac"] = {"Meskwaki"}, ["sad"] = {"Sandawe"}, ["sae"] = {"Sabanê"}, ["saf"] = {"Safaliba"}, ["sah"] = {"Yakut"}, ["sai"] = {"South American Indian languages"}, ["saj"] = {"Sahu"}, ["sak"] = {"Sake"}, ["sal"] = {"Salishan languages"}, ["sam"] = {"Samaritan Aramaic"}, ["sao"] = {"Sause"}, ["saq"] = {"Samburu"}, ["sar"] = {"Saraveca"}, ["sas"] = {"Sasak"}, ["sat"] = {"Santali"}, ["sau"] = {"Saleman"}, ["sav"] = {"Saafi-Saafi"}, ["saw"] = {"Sawi"}, ["sax"] = {"Sa"}, ["say"] = {"Saya"}, ["saz"] = {"Saurashtra"}, ["sba"] = {"Ngambay"}, ["sbb"] = {"Simbo"}, ["sbc"] = {"Kele (Papua New Guinea)"}, ["sbd"] = {"Southern Samo"}, ["sbe"] = {"Saliba"}, ["sbf"] = {"Chabu", "Shabo"}, ["sbg"] = {"Seget"}, ["sbh"] = {"Sori-Harengan"}, ["sbi"] = {"Seti"}, ["sbj"] = {"Surbakhal"}, ["sbk"] = {"Safwa"}, ["sbl"] = {"Botolan Sambal"}, ["sbm"] = {"Sagala"}, ["sbn"] = {"Sindhi Bhil"}, ["sbo"] = {"Sabüm"}, ["sbp"] = {"Sangu (Tanzania)"}, ["sbq"] = {"Sileibi"}, ["sbr"] = {"Sembakung Murut"}, ["sbs"] = {"Subiya"}, ["sbt"] = {"Kimki"}, ["sbu"] = {"Stod Bhoti"}, ["sbv"] = {"Sabine"}, ["sbw"] = {"Simba"}, ["sbx"] = {"Seberuang"}, ["sby"] = {"Soli"}, ["sbz"] = {"Sara Kaba"}, ["scb"] = {"Chut"}, ["sce"] = {"Dongxiang"}, ["scf"] = {"San Miguel Creole French"}, ["scg"] = {"Sanggau"}, ["sch"] = {"Sakachep"}, ["sci"] = {"Sri Lankan Creole Malay"}, ["sck"] = {"Sadri"}, ["scl"] = {"Shina"}, ["scn"] = {"Sicilian"}, ["sco"] = {"Scots"}, ["scp"] = {"Hyolmo", "Helambu Sherpa"}, ["scq"] = {"Sa'och"}, ["scs"] = {"North Slavey"}, ["sct"] = {"Southern Katang"}, ["scu"] = {"Shumcho"}, ["scv"] = {"Sheni"}, ["scw"] = {"Sha"}, ["scx"] = {"Sicel"}, ["sda"] = {"Toraja-Sa'dan"}, ["sdb"] = {"Shabak"}, ["sdc"] = {"Sassarese Sardinian"}, ["sde"] = {"Surubu"}, ["sdf"] = {"Sarli"}, ["sdg"] = {"Savi"}, ["sdh"] = {"Southern Kurdish"}, ["sdj"] = {"Suundi"}, ["sdk"] = {"Sos Kundi"}, ["sdl"] = {"Saudi Arabian Sign Language"}, ["sdn"] = {"Gallurese Sardinian"}, ["sdo"] = {"Bukar-Sadung Bidayuh"}, ["sdp"] = {"Sherdukpen"}, ["sdq"] = {"Semandang"}, ["sdr"] = {"Oraon Sadri"}, ["sds"] = {"Sened"}, ["sdt"] = {"Shuadit"}, ["sdu"] = {"Sarudu"}, ["sdv"] = {"Eastern Sudanic languages"}, ["sdx"] = {"Sibu Melanau"}, ["sdz"] = {"Sallands"}, ["sea"] = {"Semai"}, ["seb"] = {"Shempire Senoufo"}, ["sec"] = {"Sechelt"}, ["sed"] = {"Sedang"}, ["see"] = {"Seneca"}, ["sef"] = {"Cebaara Senoufo"}, ["seg"] = {"Segeju"}, ["seh"] = {"Sena"}, ["sei"] = {"Seri"}, ["sej"] = {"Sene"}, ["sek"] = {"Sekani"}, ["sel"] = {"Selkup"}, ["sem"] = {"Semitic languages"}, ["sen"] = {"Nanerigé Sénoufo"}, ["seo"] = {"Suarmin"}, ["sep"] = {"Sìcìté Sénoufo"}, ["seq"] = {"Senara Sénoufo"}, ["ser"] = {"Serrano"}, ["ses"] = {"Koyraboro Senni Songhai"}, ["set"] = {"Sentani"}, ["seu"] = {"Serui-Laut"}, ["sev"] = {"Nyarafolo Senoufo"}, ["sew"] = {"Sewa Bay"}, ["sey"] = {"Secoya"}, ["sez"] = {"Senthang Chin"}, ["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"}, ["sfe"] = {"Eastern Subanen"}, ["sfm"] = {"Small Flowery Miao"}, ["sfs"] = {"South African Sign Language"}, ["sfw"] = {"Sehwi"}, ["sga"] = {"Old Irish (to 900)"}, ["sgb"] = {"Mag-antsi Ayta"}, ["sgc"] = {"Kipsigis"}, ["sgd"] = {"Surigaonon"}, ["sge"] = {"Segai"}, ["sgg"] = {"Swiss-German Sign Language"}, ["sgh"] = {"Shughni"}, ["sgi"] = {"Suga"}, ["sgj"] = {"Surgujia"}, ["sgk"] = {"Sangkong"}, ["sgm"] = {"Singa"}, ["sgn"] = {"Sign languages"}, ["sgp"] = {"Singpho"}, ["sgr"] = {"Sangisari"}, ["sgs"] = {"Samogitian"}, ["sgt"] = {"Brokpake"}, ["sgu"] = {"Salas"}, ["sgw"] = {"Sebat Bet Gurage"}, ["sgx"] = {"Sierra Leone Sign Language"}, ["sgy"] = {"Sanglechi"}, ["sgz"] = {"Sursurunga"}, ["sha"] = {"Shall-Zwall"}, ["shb"] = {"Ninam"}, ["shc"] = {"Sonde"}, ["shd"] = {"Kundal Shahi"}, ["she"] = {"Sheko"}, ["shg"] = {"Shua"}, ["shh"] = {"Shoshoni"}, ["shi"] = {"Tachelhit"}, ["shj"] = {"Shatt"}, ["shk"] = {"Shilluk"}, ["shl"] = {"Shendu"}, ["shm"] = {"Shahrudi"}, ["shn"] = {"Shan"}, ["sho"] = {"Shanga"}, ["shp"] = {"Shipibo-Conibo"}, ["shq"] = {"Sala"}, ["shr"] = {"Shi"}, ["shs"] = {"Shuswap"}, ["sht"] = {"Shasta"}, ["shu"] = {"Chadian Arabic"}, ["shv"] = {"Shehri"}, ["shw"] = {"Shwai"}, ["shx"] = {"She"}, ["shy"] = {"Tachawit"}, ["shz"] = {"Syenara Senoufo"}, ["sia"] = {"Akkala Sami"}, ["sib"] = {"Sebop"}, ["sid"] = {"Sidamo"}, ["sie"] = {"Simaa"}, ["sif"] = {"Siamou"}, ["sig"] = {"Paasaal"}, ["sih"] = {"Zire", "Sîshëë"}, ["sii"] = {"Shom Peng"}, ["sij"] = {"Numbami"}, ["sik"] = {"Sikiana"}, ["sil"] = {"Tumulung Sisaala"}, ["sim"] = {"Mende (Papua New Guinea)"}, ["sio"] = {"Siouan languages"}, ["sip"] = {"Sikkimese"}, ["siq"] = {"Sonia"}, ["sir"] = {"Siri"}, ["sis"] = {"Siuslaw"}, ["sit"] = {"Sino-Tibetan languages"}, ["siu"] = {"Sinagen"}, ["siv"] = {"Sumariup"}, ["siw"] = {"Siwai"}, ["six"] = {"Sumau"}, ["siy"] = {"Sivandi"}, ["siz"] = {"Siwi"}, ["sja"] = {"Epena"}, ["sjb"] = {"Sajau Basap"}, ["sjd"] = {"Kildin Sami"}, ["sje"] = {"Pite Sami"}, ["sjg"] = {"Assangori"}, ["sjk"] = {"Kemi Sami"}, ["sjl"] = {"Sajalong", "Miji"}, ["sjm"] = {"Mapun"}, ["sjn"] = {"Sindarin"}, ["sjo"] = {"Xibe"}, ["sjp"] = {"Surjapuri"}, ["sjr"] = {"Siar-Lak"}, ["sjs"] = {"Senhaja De Srair"}, ["sjt"] = {"Ter Sami"}, ["sju"] = {"Ume Sami"}, ["sjw"] = {"Shawnee"}, ["ska"] = {"Skagit"}, ["skb"] = {"Saek"}, ["skc"] = {"Ma Manda"}, ["skd"] = {"Southern Sierra Miwok"}, ["ske"] = {"Seke (Vanuatu)"}, ["skf"] = {"Sakirabiá"}, ["skg"] = {"Sakalava Malagasy"}, ["skh"] = {"Sikule"}, ["ski"] = {"Sika"}, ["skj"] = {"Seke (Nepal)"}, ["skm"] = {"Kutong"}, ["skn"] = {"Kolibugan Subanon"}, ["sko"] = {"Seko Tengah"}, ["skp"] = {"Sekapan"}, ["skq"] = {"Sininkere"}, ["skr"] = {"Saraiki", "Seraiki"}, ["sks"] = {"Maia"}, ["skt"] = {"Sakata"}, ["sku"] = {"Sakao"}, ["skv"] = {"Skou"}, ["skw"] = {"Skepi Creole Dutch"}, ["skx"] = {"Seko Padang"}, ["sky"] = {"Sikaiana"}, ["skz"] = {"Sekar"}, ["sla"] = {"Slavic languages"}, ["slc"] = {"Sáliba"}, ["sld"] = {"Sissala"}, ["sle"] = {"Sholaga"}, ["slf"] = {"Swiss-Italian Sign Language"}, ["slg"] = {"Selungai Murut"}, ["slh"] = {"Southern Puget Sound Salish"}, ["sli"] = {"Lower Silesian"}, ["slj"] = {"Salumá"}, ["sll"] = {"Salt-Yui"}, ["slm"] = {"Pangutaran Sama"}, ["sln"] = {"Salinan"}, ["slp"] = {"Lamaholot"}, ["slr"] = {"Salar"}, ["sls"] = {"Singapore Sign Language"}, ["slt"] = {"Sila"}, ["slu"] = {"Selaru"}, ["slw"] = {"Sialum"}, ["slx"] = {"Salampasu"}, ["sly"] = {"Selayar"}, ["slz"] = {"Ma'ya"}, ["sma"] = {"Southern Sami"}, ["smb"] = {"Simbari"}, ["smc"] = {"Som"}, ["smf"] = {"Auwe"}, ["smg"] = {"Simbali"}, ["smh"] = {"Samei"}, ["smi"] = {"Sami languages"}, ["smj"] = {"Lule Sami"}, ["smk"] = {"Bolinao"}, ["sml"] = {"Central Sama"}, ["smm"] = {"Musasa"}, ["smn"] = {"Inari Sami"}, ["smp"] = {"Samaritan"}, ["smq"] = {"Samo"}, ["smr"] = {"Simeulue"}, ["sms"] = {"Skolt Sami"}, ["smt"] = {"Simte"}, ["smu"] = {"Somray"}, ["smv"] = {"Samvedi"}, ["smw"] = {"Sumbawa"}, ["smx"] = {"Samba"}, ["smy"] = {"Semnani"}, ["smz"] = {"Simeku"}, ["snc"] = {"Sinaugoro"}, ["sne"] = {"Bau Bidayuh"}, ["snf"] = {"Noon"}, ["sng"] = {"Sanga (Democratic Republic of Congo)"}, ["sni"] = {"Sensi"}, ["snj"] = {"Riverain Sango"}, ["snk"] = {"Soninke"}, ["snl"] = {"Sangil"}, ["snm"] = {"Southern Ma'di"}, ["snn"] = {"Siona"}, ["sno"] = {"Snohomish"}, ["snp"] = {"Siane"}, ["snq"] = {"Sangu (Gabon)"}, ["snr"] = {"Sihan"}, ["sns"] = {"South West Bay", "Nahavaq"}, ["snu"] = {"Senggi", "Viid"}, ["snv"] = {"Sa'ban"}, ["snw"] = {"Selee"}, ["snx"] = {"Sam"}, ["sny"] = {"Saniyo-Hiyewe"}, ["snz"] = {"Kou"}, ["soa"] = {"Thai Song"}, ["sob"] = {"Sobei"}, ["soc"] = {"So (Democratic Republic of Congo)"}, ["sod"] = {"Songoora"}, ["soe"] = {"Songomeno"}, ["sog"] = {"Sogdian"}, ["soh"] = {"Aka"}, ["soi"] = {"Sonha"}, ["soj"] = {"Soi"}, ["sok"] = {"Sokoro"}, ["sol"] = {"Solos"}, ["son"] = {"Songhai languages"}, ["soo"] = {"Songo"}, ["sop"] = {"Songe"}, ["soq"] = {"Kanasi"}, ["sor"] = {"Somrai"}, ["sos"] = {"Seeku"}, ["sou"] = {"Southern Thai"}, ["sov"] = {"Sonsorol"}, ["sow"] = {"Sowanda"}, ["sox"] = {"Swo"}, ["soy"] = {"Miyobe"}, ["soz"] = {"Temi"}, ["spb"] = {"Sepa (Indonesia)"}, ["spc"] = {"Sapé"}, ["spd"] = {"Saep"}, ["spe"] = {"Sepa (Papua New Guinea)"}, ["spg"] = {"Sian"}, ["spi"] = {"Saponi"}, ["spk"] = {"Sengo"}, ["spl"] = {"Selepet"}, ["spm"] = {"Akukem"}, ["spn"] = {"Sanapaná"}, ["spo"] = {"Spokane"}, ["spp"] = {"Supyire Senoufo"}, ["spq"] = {"Loreto-Ucayali Spanish"}, ["spr"] = {"Saparua"}, ["sps"] = {"Saposa"}, ["spt"] = {"Spiti Bhoti"}, ["spu"] = {"Sapuan"}, ["spv"] = {"Sambalpuri", "Kosli"}, ["spx"] = {"South Picene"}, ["spy"] = {"Sabaot"}, ["sqa"] = {"Shama-Sambuga"}, ["sqh"] = {"Shau"}, ["sqj"] = {"Albanian languages"}, ["sqk"] = {"Albanian Sign Language"}, ["sqm"] = {"Suma"}, ["sqn"] = {"Susquehannock"}, ["sqo"] = {"Sorkhei"}, ["sqq"] = {"Sou"}, ["sqr"] = {"Siculo Arabic"}, ["sqs"] = {"Sri Lankan Sign Language"}, ["sqt"] = {"Soqotri"}, ["squ"] = {"Squamish"}, ["sqx"] = {"Kufr Qassem Sign Language (KQSL)"}, ["sra"] = {"Saruga"}, ["srb"] = {"Sora"}, ["src"] = {"Logudorese Sardinian"}, ["sre"] = {"Sara"}, ["srf"] = {"Nafi"}, ["srg"] = {"Sulod"}, ["srh"] = {"Sarikoli"}, ["sri"] = {"Siriano"}, ["srk"] = {"Serudung Murut"}, ["srl"] = {"Isirawa"}, ["srm"] = {"Saramaccan"}, ["srn"] = {"Sranan Tongo"}, ["sro"] = {"Campidanese Sardinian"}, ["srq"] = {"Sirionó"}, ["srr"] = {"Serer"}, ["srs"] = {"Sarsi"}, ["srt"] = {"Sauri"}, ["sru"] = {"Suruí"}, ["srv"] = {"Southern Sorsoganon"}, ["srw"] = {"Serua"}, ["srx"] = {"Sirmauri"}, ["sry"] = {"Sera"}, ["srz"] = {"Shahmirzadi"}, ["ssa"] = {"Nilo-Saharan languages"}, ["ssb"] = {"Southern Sama"}, ["ssc"] = {"Suba-Simbiti"}, ["ssd"] = {"Siroi"}, ["sse"] = {"Balangingi", "Bangingih Sama"}, ["ssf"] = {"Thao"}, ["ssg"] = {"Seimat"}, ["ssh"] = {"Shihhi Arabic"}, ["ssi"] = {"Sansi"}, ["ssj"] = {"Sausi"}, ["ssk"] = {"Sunam"}, ["ssl"] = {"Western Sisaala"}, ["ssm"] = {"Semnam"}, ["ssn"] = {"Waata"}, ["sso"] = {"Sissano"}, ["ssp"] = {"Spanish Sign Language"}, ["ssq"] = {"So'a"}, ["ssr"] = {"Swiss-French Sign Language"}, ["sss"] = {"Sô"}, ["sst"] = {"Sinasina"}, ["ssu"] = {"Susuami"}, ["ssv"] = {"Shark Bay"}, ["ssx"] = {"Samberigi"}, ["ssy"] = {"Saho"}, ["ssz"] = {"Sengseng"}, ["sta"] = {"Settla"}, ["stb"] = {"Northern Subanen"}, ["std"] = {"Sentinel"}, ["ste"] = {"Liana-Seti"}, ["stf"] = {"Seta"}, ["stg"] = {"Trieng"}, ["sth"] = {"Shelta"}, ["sti"] = {"Bulo Stieng"}, ["stj"] = {"Matya Samo"}, ["stk"] = {"Arammba"}, ["stl"] = {"Stellingwerfs"}, ["stm"] = {"Setaman"}, ["stn"] = {"Owa"}, ["sto"] = {"Stoney"}, ["stp"] = {"Southeastern Tepehuan"}, ["stq"] = {"Saterfriesisch"}, ["str"] = {"Straits Salish"}, ["sts"] = {"Shumashti"}, ["stt"] = {"Budeh Stieng"}, ["stu"] = {"Samtao"}, ["stv"] = {"Silt'e"}, ["stw"] = {"Satawalese"}, ["sty"] = {"Siberian Tatar"}, ["sua"] = {"Sulka"}, ["sub"] = {"Suku"}, ["suc"] = {"Western Subanon"}, ["sue"] = {"Suena"}, ["sug"] = {"Suganga"}, ["sui"] = {"Suki"}, ["suj"] = {"Shubi"}, ["suk"] = {"Sukuma"}, ["suo"] = {"Bouni"}, ["suq"] = {"Tirmaga-Chai Suri", "Suri"}, ["sur"] = {"Mwaghavul"}, ["sus"] = {"Susu"}, ["sut"] = {"Subtiaba"}, ["suv"] = {"Puroik"}, ["suw"] = {"Sumbwa"}, ["sux"] = {"Sumerian"}, ["suy"] = {"Suyá"}, ["suz"] = {"Sunwar"}, ["sva"] = {"Svan"}, ["svb"] = {"Ulau-Suain"}, ["svc"] = {"Vincentian Creole English"}, ["sve"] = {"Serili"}, ["svk"] = {"Slovakian Sign Language"}, ["svm"] = {"Slavomolisano"}, ["svs"] = {"Savosavo"}, ["svx"] = {"Skalvian"}, ["swb"] = {"Maore Comorian"}, ["swc"] = {"Congo Swahili"}, ["swf"] = {"Sere"}, ["swg"] = {"Swabian"}, ["swh"] = {"Swahili (individual language)", "Kiswahili"}, ["swi"] = {"Sui"}, ["swj"] = {"Sira"}, ["swk"] = {"Malawi Sena"}, ["swl"] = {"Swedish Sign Language"}, ["swm"] = {"Samosa"}, ["swn"] = {"Sawknah"}, ["swo"] = {"Shanenawa"}, ["swp"] = {"Suau"}, ["swq"] = {"Sharwa"}, ["swr"] = {"Saweru"}, ["sws"] = {"Seluwasan"}, ["swt"] = {"Sawila"}, ["swu"] = {"Suwawa"}, ["swv"] = {"Shekhawati"}, ["sww"] = {"Sowa"}, ["swx"] = {"Suruahá"}, ["swy"] = {"Sarua"}, ["sxb"] = {"Suba"}, ["sxc"] = {"Sicanian"}, ["sxe"] = {"Sighu"}, ["sxg"] = {"Shuhi", "Shixing"}, ["sxk"] = {"Southern Kalapuya"}, ["sxl"] = {"Selian"}, ["sxm"] = {"Samre"}, ["sxn"] = {"Sangir"}, ["sxo"] = {"Sorothaptic"}, ["sxr"] = {"Saaroa"}, ["sxs"] = {"Sasaru"}, ["sxu"] = {"Upper Saxon"}, ["sxw"] = {"Saxwe Gbe"}, ["sya"] = {"Siang"}, ["syb"] = {"Central Subanen"}, ["syc"] = {"Classical Syriac"}, ["syd"] = {"Samoyedic languages"}, ["syi"] = {"Seki"}, ["syk"] = {"Sukur"}, ["syl"] = {"Sylheti"}, ["sym"] = {"Maya Samo"}, ["syn"] = {"Senaya"}, ["syo"] = {"Suoy"}, ["syr"] = {"Syriac"}, ["sys"] = {"Sinyar"}, ["syw"] = {"Kagate"}, ["syx"] = {"Samay"}, ["syy"] = {"Al-Sayyid Bedouin Sign Language"}, ["sza"] = {"Semelai"}, ["szb"] = {"Ngalum"}, ["szc"] = {"Semaq Beri"}, ["sze"] = {"Seze"}, ["szg"] = {"Sengele"}, ["szl"] = {"Silesian"}, ["szn"] = {"Sula"}, ["szp"] = {"Suabo"}, ["szs"] = {"Solomon Islands Sign Language"}, ["szv"] = {"Isu (Fako Division)"}, ["szw"] = {"Sawai"}, ["szy"] = {"Sakizaya"}, ["taa"] = {"Lower Tanana"}, ["tab"] = {"Tabassaran"}, ["tac"] = {"Lowland Tarahumara"}, ["tad"] = {"Tause"}, ["tae"] = {"Tariana"}, ["taf"] = {"Tapirapé"}, ["tag"] = {"Tagoi"}, ["tai"] = {"Tai languages"}, ["taj"] = {"Eastern Tamang"}, ["tak"] = {"Tala"}, ["tal"] = {"Tal"}, ["tan"] = {"Tangale"}, ["tao"] = {"Yami"}, ["tap"] = {"Taabwa"}, ["taq"] = {"Tamasheq"}, ["tar"] = {"Central Tarahumara"}, ["tas"] = {"Tay Boi"}, ["tau"] = {"Upper Tanana"}, ["tav"] = {"Tatuyo"}, ["taw"] = {"Tai"}, ["tax"] = {"Tamki"}, ["tay"] = {"Atayal"}, ["taz"] = {"Tocho"}, ["tba"] = {"Aikanã"}, ["tbc"] = {"Takia"}, ["tbd"] = {"Kaki Ae"}, ["tbe"] = {"Tanimbili"}, ["tbf"] = {"Mandara"}, ["tbg"] = {"North Tairora"}, ["tbh"] = {"Dharawal", "Thurawal"}, ["tbi"] = {"Gaam"}, ["tbj"] = {"Tiang"}, ["tbk"] = {"Calamian Tagbanwa"}, ["tbl"] = {"Tboli"}, ["tbm"] = {"Tagbu"}, ["tbn"] = {"Barro Negro Tunebo"}, ["tbo"] = {"Tawala"}, ["tbp"] = {"Taworta", "Diebroud"}, ["tbq"] = {"Tibeto-Burman languages"}, ["tbr"] = {"Tumtum"}, ["tbs"] = {"Tanguat"}, ["tbt"] = {"Tembo (Kitembo)"}, ["tbu"] = {"Tubar"}, ["tbv"] = {"Tobo"}, ["tbw"] = {"Tagbanwa"}, ["tbx"] = {"Kapin"}, ["tby"] = {"Tabaru"}, ["tbz"] = {"Ditammari"}, ["tca"] = {"Ticuna"}, ["tcb"] = {"Tanacross"}, ["tcc"] = {"Datooga"}, ["tcd"] = {"Tafi"}, ["tce"] = {"Southern Tutchone"}, ["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"}, ["tcg"] = {"Tamagario"}, ["tch"] = {"Turks And Caicos Creole English"}, ["tci"] = {"Wára"}, ["tck"] = {"Tchitchege"}, ["tcl"] = {"Taman (Myanmar)"}, ["tcm"] = {"Tanahmerah"}, ["tcn"] = {"Tichurong"}, ["tco"] = {"Taungyo"}, ["tcp"] = {"Tawr Chin"}, ["tcq"] = {"Kaiy"}, ["tcs"] = {"Torres Strait Creole", "Yumplatok"}, ["tct"] = {"T'en"}, ["tcu"] = {"Southeastern Tarahumara"}, ["tcw"] = {"Tecpatlán Totonac"}, ["tcx"] = {"Toda"}, ["tcy"] = {"Tulu"}, ["tcz"] = {"Thado Chin"}, ["tda"] = {"Tagdal"}, ["tdb"] = {"Panchpargania"}, ["tdc"] = {"Emberá-Tadó"}, ["tdd"] = {"Tai Nüa"}, ["tde"] = {"Tiranige Diga Dogon"}, ["tdf"] = {"Talieng"}, ["tdg"] = {"Western Tamang"}, ["tdh"] = {"Thulung"}, ["tdi"] = {"Tomadino"}, ["tdj"] = {"Tajio"}, ["tdk"] = {"Tambas"}, ["tdl"] = {"Sur"}, ["tdm"] = {"Taruma"}, ["tdn"] = {"Tondano"}, ["tdo"] = {"Teme"}, ["tdq"] = {"Tita"}, ["tdr"] = {"Todrah"}, ["tds"] = {"Doutai"}, ["tdt"] = {"Tetun Dili"}, ["tdv"] = {"Toro"}, ["tdx"] = {"Tandroy-Mahafaly Malagasy"}, ["tdy"] = {"Tadyawan"}, ["tea"] = {"Temiar"}, ["teb"] = {"Tetete"}, ["tec"] = {"Terik"}, ["ted"] = {"Tepo Krumen"}, ["tee"] = {"Huehuetla Tepehua"}, ["tef"] = {"Teressa"}, ["teg"] = {"Teke-Tege"}, ["teh"] = {"Tehuelche"}, ["tei"] = {"Torricelli"}, ["tek"] = {"Ibali Teke"}, ["tem"] = {"Timne"}, ["ten"] = {"Tama (Colombia)"}, ["teo"] = {"Teso"}, ["tep"] = {"Tepecano"}, ["teq"] = {"Temein"}, ["ter"] = {"Tereno"}, ["tes"] = {"Tengger"}, ["tet"] = {"Tetum"}, ["teu"] = {"Soo"}, ["tev"] = {"Teor"}, ["tew"] = {"Tewa (USA)"}, ["tex"] = {"Tennet"}, ["tey"] = {"Tulishi"}, ["tez"] = {"Tetserret"}, ["tfi"] = {"Tofin Gbe"}, ["tfn"] = {"Tanaina"}, ["tfo"] = {"Tefaro"}, ["tfr"] = {"Teribe"}, ["tft"] = {"Ternate"}, ["tga"] = {"Sagalla"}, ["tgb"] = {"Tobilung"}, ["tgc"] = {"Tigak"}, ["tgd"] = {"Ciwogai"}, ["tge"] = {"Eastern Gorkha Tamang"}, ["tgf"] = {"Chalikha"}, ["tgh"] = {"Tobagonian Creole English"}, ["tgi"] = {"Lawunuia"}, ["tgj"] = {"Tagin"}, ["tgn"] = {"Tandaganon"}, ["tgo"] = {"Sudest"}, ["tgp"] = {"Tangoa"}, ["tgq"] = {"Tring"}, ["tgr"] = {"Tareng"}, ["tgs"] = {"Nume"}, ["tgt"] = {"Central Tagbanwa"}, ["tgu"] = {"Tanggu"}, ["tgv"] = {"Tingui-Boto"}, ["tgw"] = {"Tagwana Senoufo"}, ["tgx"] = {"Tagish"}, ["tgy"] = {"Togoyo"}, ["tgz"] = {"Tagalaka"}, ["thd"] = {"Kuuk Thaayorre", "Thayore"}, ["the"] = {"Chitwania Tharu"}, ["thf"] = {"Thangmi"}, ["thh"] = {"Northern Tarahumara"}, ["thi"] = {"Tai Long"}, ["thk"] = {"Tharaka", "Kitharaka"}, ["thl"] = {"Dangaura Tharu"}, ["thm"] = {"Aheu"}, ["thn"] = {"Thachanadan"}, ["thp"] = {"Thompson"}, ["thq"] = {"Kochila Tharu"}, ["thr"] = {"Rana Tharu"}, ["ths"] = {"Thakali"}, ["tht"] = {"Tahltan"}, ["thu"] = {"Thuri"}, ["thv"] = {"Tahaggart Tamahaq"}, ["thy"] = {"Tha"}, ["thz"] = {"Tayart Tamajeq"}, ["tia"] = {"Tidikelt Tamazight"}, ["tic"] = {"Tira"}, ["tif"] = {"Tifal"}, ["tig"] = {"Tigre"}, ["tih"] = {"Timugon Murut"}, ["tii"] = {"Tiene"}, ["tij"] = {"Tilung"}, ["tik"] = {"Tikar"}, ["til"] = {"Tillamook"}, ["tim"] = {"Timbe"}, ["tin"] = {"Tindi"}, ["tio"] = {"Teop"}, ["tip"] = {"Trimuris"}, ["tiq"] = {"Tiéfo"}, ["tis"] = {"Masadiit Itneg"}, ["tit"] = {"Tinigua"}, ["tiu"] = {"Adasen"}, ["tiv"] = {"Tiv"}, ["tiw"] = {"Tiwi"}, ["tix"] = {"Southern Tiwa"}, ["tiy"] = {"Tiruray"}, ["tiz"] = {"Tai Hongjin"}, ["tja"] = {"Tajuasohn"}, ["tjg"] = {"Tunjung"}, ["tji"] = {"Northern Tujia"}, ["tjj"] = {"Tjungundji"}, ["tjl"] = {"Tai Laing"}, ["tjm"] = {"Timucua"}, ["tjn"] = {"Tonjon"}, ["tjo"] = {"Temacine Tamazight"}, ["tjp"] = {"Tjupany"}, ["tjs"] = {"Southern Tujia"}, ["tju"] = {"Tjurruru"}, ["tjw"] = {"Djabwurrung"}, ["tka"] = {"Truká"}, ["tkb"] = {"Buksa"}, ["tkd"] = {"Tukudede"}, ["tke"] = {"Takwane"}, ["tkf"] = {"Tukumanféd"}, ["tkg"] = {"Tesaka Malagasy"}, ["tkl"] = {"Tokelau"}, ["tkm"] = {"Takelma"}, ["tkn"] = {"Toku-No-Shima"}, ["tkp"] = {"Tikopia"}, ["tkq"] = {"Tee"}, ["tkr"] = {"Tsakhur"}, ["tks"] = {"Takestani"}, ["tkt"] = {"Kathoriya Tharu"}, ["tku"] = {"Upper Necaxa Totonac"}, ["tkv"] = {"Mur Pano"}, ["tkw"] = {"Teanu"}, ["tkx"] = {"Tangko"}, ["tkz"] = {"Takua"}, ["tla"] = {"Southwestern Tepehuan"}, ["tlb"] = {"Tobelo"}, ["tlc"] = {"Yecuatla Totonac"}, ["tld"] = {"Talaud"}, ["tlf"] = {"Telefol"}, ["tlg"] = {"Tofanma"}, ["tlh"] = {"Klingon", "tlhIngan Hol"}, ["tli"] = {"Tlingit"}, ["tlj"] = {"Talinga-Bwisi"}, ["tlk"] = {"Taloki"}, ["tll"] = {"Tetela"}, ["tlm"] = {"Tolomako"}, ["tln"] = {"Talondo'"}, ["tlo"] = {"Talodi"}, ["tlp"] = {"Filomena Mata-Coahuitlán Totonac"}, ["tlq"] = {"Tai Loi"}, ["tlr"] = {"Talise"}, ["tls"] = {"Tambotalo"}, ["tlt"] = {"Sou Nama", "Teluti"}, ["tlu"] = {"Tulehu"}, ["tlv"] = {"Taliabu"}, ["tlx"] = {"Khehek"}, ["tly"] = {"Talysh"}, ["tma"] = {"Tama (Chad)"}, ["tmb"] = {"Katbol", "Avava"}, ["tmc"] = {"Tumak"}, ["tmd"] = {"Haruai"}, ["tme"] = {"Tremembé"}, ["tmf"] = {"Toba-Maskoy"}, ["tmg"] = {"Ternateño"}, ["tmh"] = {"Tamashek"}, ["tmi"] = {"Tutuba"}, ["tmj"] = {"Samarokena"}, ["tml"] = {"Tamnim Citak"}, ["tmm"] = {"Tai Thanh"}, ["tmn"] = {"Taman (Indonesia)"}, ["tmo"] = {"Temoq"}, ["tmq"] = {"Tumleo"}, ["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"}, ["tms"] = {"Tima"}, ["tmt"] = {"Tasmate"}, ["tmu"] = {"Iau"}, ["tmv"] = {"Tembo (Motembo)"}, ["tmw"] = {"Temuan"}, ["tmy"] = {"Tami"}, ["tmz"] = {"Tamanaku"}, ["tna"] = {"Tacana"}, ["tnb"] = {"Western Tunebo"}, ["tnc"] = {"Tanimuca-Retuarã"}, ["tnd"] = {"Angosturas Tunebo"}, ["tng"] = {"Tobanga"}, ["tnh"] = {"Maiani"}, ["tni"] = {"Tandia"}, ["tnk"] = {"Kwamera"}, ["tnl"] = {"Lenakel"}, ["tnm"] = {"Tabla"}, ["tnn"] = {"North Tanna"}, ["tno"] = {"Toromono"}, ["tnp"] = {"Whitesands"}, ["tnq"] = {"Taino"}, ["tnr"] = {"Ménik"}, ["tns"] = {"Tenis"}, ["tnt"] = {"Tontemboan"}, ["tnu"] = {"Tay Khang"}, ["tnv"] = {"Tangchangya"}, ["tnw"] = {"Tonsawang"}, ["tnx"] = {"Tanema"}, ["tny"] = {"Tongwe"}, ["tnz"] = {"Ten'edn"}, ["tob"] = {"Toba"}, ["toc"] = {"Coyutla Totonac"}, ["tod"] = {"Toma"}, ["tof"] = {"Gizrra"}, ["tog"] = {"Tonga (Nyasa)"}, ["toh"] = {"Gitonga"}, ["toi"] = {"Tonga (Zambia)"}, ["toj"] = {"Tojolabal"}, ["tok"] = {"Toki Pona"}, ["tol"] = {"Tolowa"}, ["tom"] = {"Tombulu"}, ["too"] = {"Xicotepec De Juárez Totonac"}, ["top"] = {"Papantla Totonac"}, ["toq"] = {"Toposa"}, ["tor"] = {"Togbo-Vara Banda"}, ["tos"] = {"Highland Totonac"}, ["tou"] = {"Tho"}, ["tov"] = {"Upper Taromi"}, ["tow"] = {"Jemez"}, ["tox"] = {"Tobian"}, ["toy"] = {"Topoiyo"}, ["toz"] = {"To"}, ["tpa"] = {"Taupota"}, ["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"}, ["tpe"] = {"Tippera"}, ["tpf"] = {"Tarpia"}, ["tpg"] = {"Kula"}, ["tpi"] = {"Tok Pisin"}, ["tpj"] = {"Tapieté"}, ["tpk"] = {"Tupinikin"}, ["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"}, ["tpm"] = {"Tampulma"}, ["tpn"] = {"Tupinambá"}, ["tpo"] = {"Tai Pao"}, ["tpp"] = {"Pisaflores Tepehua"}, ["tpq"] = {"Tukpa"}, ["tpr"] = {"Tuparí"}, ["tpt"] = {"Tlachichilco Tepehua"}, ["tpu"] = {"Tampuan"}, ["tpv"] = {"Tanapag"}, ["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"}, ["tpy"] = {"Trumai"}, ["tpz"] = {"Tinputz"}, ["tqb"] = {"Tembé"}, ["tql"] = {"Lehali"}, ["tqm"] = {"Turumsa"}, ["tqn"] = {"Tenino"}, ["tqo"] = {"Toaripi"}, ["tqp"] = {"Tomoip"}, ["tqq"] = {"Tunni"}, ["tqr"] = {"Torona"}, ["tqt"] = {"Western Totonac"}, ["tqu"] = {"Touo"}, ["tqw"] = {"Tonkawa"}, ["tra"] = {"Tirahi"}, ["trb"] = {"Terebu"}, ["trc"] = {"Copala Triqui"}, ["trd"] = {"Turi"}, ["tre"] = {"East Tarangan"}, ["trf"] = {"Trinidadian Creole English"}, ["trg"] = {"Lishán Didán"}, ["trh"] = {"Turaka"}, ["tri"] = {"Trió"}, ["trj"] = {"Toram"}, ["trk"] = {"Turkic languages"}, ["trl"] = {"Traveller Scottish"}, ["trm"] = {"Tregami"}, ["trn"] = {"Trinitario"}, ["tro"] = {"Tarao Naga"}, ["trp"] = {"Kok Borok"}, ["trq"] = {"San Martín Itunyoso Triqui"}, ["trr"] = {"Taushiro"}, ["trs"] = {"Chicahuaxtla Triqui"}, ["trt"] = {"Tunggare"}, ["tru"] = {"Turoyo", "Surayt"}, ["trv"] = {"Sediq", "Seediq", "Taroko"}, ["trw"] = {"Torwali"}, ["trx"] = {"Tringgus-Sembaan Bidayuh"}, ["try"] = {"Turung"}, ["trz"] = {"Torá"}, ["tsa"] = {"Tsaangi"}, ["tsb"] = {"Tsamai"}, ["tsc"] = {"Tswa"}, ["tsd"] = {"Tsakonian"}, ["tse"] = {"Tunisian Sign Language"}, ["tsg"] = {"Tausug"}, ["tsh"] = {"Tsuvan"}, ["tsi"] = {"Tsimshian"}, ["tsj"] = {"Tshangla"}, ["tsk"] = {"Tseku"}, ["tsl"] = {"Ts'ün-Lao"}, ["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"}, ["tsp"] = {"Northern Toussian"}, ["tsq"] = {"Thai Sign Language"}, ["tsr"] = {"Akei"}, ["tss"] = {"Taiwan Sign Language"}, ["tst"] = {"Tondi Songway Kiini"}, ["tsu"] = {"Tsou"}, ["tsv"] = {"Tsogo"}, ["tsw"] = {"Tsishingini"}, ["tsx"] = {"Mubami"}, ["tsy"] = {"Tebul Sign Language"}, ["tsz"] = {"Purepecha"}, ["tta"] = {"Tutelo"}, ["ttb"] = {"Gaa"}, ["ttc"] = {"Tektiteko"}, ["ttd"] = {"Tauade"}, ["tte"] = {"Bwanabwana"}, ["ttf"] = {"Tuotomb"}, ["ttg"] = {"Tutong"}, ["tth"] = {"Upper Ta'oih"}, ["tti"] = {"Tobati"}, ["ttj"] = {"Tooro"}, ["ttk"] = {"Totoro"}, ["ttl"] = {"Totela"}, ["ttm"] = {"Northern Tutchone"}, ["ttn"] = {"Towei"}, ["tto"] = {"Lower Ta'oih"}, ["ttp"] = {"Tombelala"}, ["ttq"] = {"Tawallammat Tamajaq"}, ["ttr"] = {"Tera"}, ["tts"] = {"Northeastern Thai"}, ["ttt"] = {"Muslim Tat"}, ["ttu"] = {"Torau"}, ["ttv"] = {"Titan"}, ["ttw"] = {"Long Wat"}, ["tty"] = {"Sikaritai"}, ["ttz"] = {"Tsum"}, ["tua"] = {"Wiarumus"}, ["tub"] = {"Tübatulabal"}, ["tuc"] = {"Mutu"}, ["tud"] = {"Tuxá"}, ["tue"] = {"Tuyuca"}, ["tuf"] = {"Central Tunebo"}, ["tug"] = {"Tunia"}, ["tuh"] = {"Taulil"}, ["tui"] = {"Tupuri"}, ["tuj"] = {"Tugutil"}, ["tul"] = {"Tula"}, ["tum"] = {"Tumbuka"}, ["tun"] = {"Tunica"}, ["tuo"] = {"Tucano"}, ["tup"] = {"Tupi languages"}, ["tuq"] = {"Tedaga"}, ["tus"] = {"Tuscarora"}, ["tut"] = {"Altaic languages"}, ["tuu"] = {"Tututni"}, ["tuv"] = {"Turkana"}, ["tuw"] = {"Tungus languages"}, ["tux"] = {"Tuxináwa"}, ["tuy"] = {"Tugen"}, ["tuz"] = {"Turka"}, ["tva"] = {"Vaghua"}, ["tvd"] = {"Tsuvadi"}, ["tve"] = {"Te'un"}, ["tvi"] = {"Tulai"}, ["tvk"] = {"Southeast Ambrym"}, ["tvl"] = {"Tuvalu"}, ["tvm"] = {"Tela-Masbuar"}, ["tvn"] = {"Tavoyan"}, ["tvo"] = {"Tidore"}, ["tvs"] = {"Taveta"}, ["tvt"] = {"Tutsa Naga"}, ["tvu"] = {"Tunen"}, ["tvw"] = {"Sedoa"}, ["tvx"] = {"Taivoan"}, ["tvy"] = {"Timor Pidgin"}, ["twa"] = {"Twana"}, ["twb"] = {"Western Tawbuid"}, ["twc"] = {"Teshenawa"}, ["twd"] = {"Twents"}, ["twe"] = {"Tewa (Indonesia)"}, ["twf"] = {"Northern Tiwa"}, ["twg"] = {"Tereweng"}, ["twh"] = {"Tai Dón"}, ["twl"] = {"Tawara"}, ["twm"] = {"Tawang Monpa"}, ["twn"] = {"Twendi"}, ["two"] = {"Tswapong"}, ["twp"] = {"Ere"}, ["twq"] = {"Tasawaq"}, ["twr"] = {"Southwestern Tarahumara"}, ["twt"] = {"Turiwára"}, ["twu"] = {"Termanu"}, ["tww"] = {"Tuwari"}, ["twx"] = {"Tewe"}, ["twy"] = {"Tawoyan"}, ["txa"] = {"Tombonuo"}, ["txb"] = {"Tokharian B"}, ["txc"] = {"Tsetsaut"}, ["txe"] = {"Totoli"}, ["txg"] = {"Tangut"}, ["txh"] = {"Thracian"}, ["txi"] = {"Ikpeng"}, ["txj"] = {"Tarjumo"}, ["txm"] = {"Tomini"}, ["txn"] = {"West Tarangan"}, ["txo"] = {"Toto"}, ["txq"] = {"Tii"}, ["txr"] = {"Tartessian"}, ["txs"] = {"Tonsea"}, ["txt"] = {"Citak"}, ["txu"] = {"Kayapó"}, ["txx"] = {"Tatana"}, ["txy"] = {"Tanosy Malagasy"}, ["tya"] = {"Tauya"}, ["tye"] = {"Kyanga"}, ["tyh"] = {"O'du"}, ["tyi"] = {"Teke-Tsaayi"}, ["tyj"] = {"Tai Do", "Tai Yo"}, ["tyl"] = {"Thu Lao"}, ["tyn"] = {"Kombai"}, ["typ"] = {"Thaypan"}, ["tyr"] = {"Tai Daeng"}, ["tys"] = {"Tày Sa Pa"}, ["tyt"] = {"Tày Tac"}, ["tyu"] = {"Kua"}, ["tyv"] = {"Tuvinian"}, ["tyx"] = {"Teke-Tyee"}, ["tyy"] = {"Tiyaa"}, ["tyz"] = {"Tày"}, ["tza"] = {"Tanzanian Sign Language"}, ["tzh"] = {"Tzeltal"}, ["tzj"] = {"Tz'utujil"}, ["tzl"] = {"Talossan"}, ["tzm"] = {"Central Atlas Tamazight"}, ["tzn"] = {"Tugun"}, ["tzo"] = {"Tzotzil"}, ["tzx"] = {"Tabriak"}, ["uam"] = {"Uamué"}, ["uan"] = {"Kuan"}, ["uar"] = {"Tairuma"}, ["uba"] = {"Ubang"}, ["ubi"] = {"Ubi"}, ["ubl"] = {"Buhi'non Bikol"}, ["ubr"] = {"Ubir"}, ["ubu"] = {"Umbu-Ungu"}, ["uby"] = {"Ubykh"}, ["uda"] = {"Uda"}, ["ude"] = {"Udihe"}, ["udg"] = {"Muduga"}, ["udi"] = {"Udi"}, ["udj"] = {"Ujir"}, ["udl"] = {"Wuzlam"}, ["udm"] = {"Udmurt"}, ["udu"] = {"Uduk"}, ["ues"] = {"Kioko"}, ["ufi"] = {"Ufim"}, ["uga"] = {"Ugaritic"}, ["ugb"] = {"Kuku-Ugbanh"}, ["uge"] = {"Ughele"}, ["ugh"] = {"Kubachi"}, ["ugn"] = {"Ugandan Sign Language"}, ["ugo"] = {"Ugong"}, ["ugy"] = {"Uruguayan Sign Language"}, ["uha"] = {"Uhami"}, ["uhn"] = {"Damal"}, ["uis"] = {"Uisai"}, ["uiv"] = {"Iyive"}, ["uji"] = {"Tanjijili"}, ["uka"] = {"Kaburi"}, ["ukg"] = {"Ukuriguma"}, ["ukh"] = {"Ukhwejo"}, ["uki"] = {"Kui (India)"}, ["ukk"] = {"Muak Sa-aak"}, ["ukl"] = {"Ukrainian Sign Language"}, ["ukp"] = {"Ukpe-Bayobiri"}, ["ukq"] = {"Ukwa"}, ["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"}, ["uku"] = {"Ukue"}, ["ukv"] = {"Kuku"}, ["ukw"] = {"Ukwuani-Aboh-Ndoni"}, ["uky"] = {"Kuuk-Yak"}, ["ula"] = {"Fungwa"}, ["ulb"] = {"Ulukwumi"}, ["ulc"] = {"Ulch"}, ["ule"] = {"Lule"}, ["ulf"] = {"Usku", "Afra"}, ["uli"] = {"Ulithian"}, ["ulk"] = {"Meriam Mir"}, ["ull"] = {"Ullatan"}, ["ulm"] = {"Ulumanda'"}, ["uln"] = {"Unserdeutsch"}, ["ulu"] = {"Uma' Lung"}, ["ulw"] = {"Ulwa"}, ["uly"] = {"Buli"}, ["uma"] = {"Umatilla"}, ["umb"] = {"Umbundu"}, ["umc"] = {"Marrucinian"}, ["umd"] = {"Umbindhamu"}, ["umg"] = {"Morrobalama", "Umbuygamu"}, ["umi"] = {"Ukit"}, ["umm"] = {"Umon"}, ["umn"] = {"Makyan Naga"}, ["umo"] = {"Umotína"}, ["ump"] = {"Umpila"}, ["umr"] = {"Umbugarla"}, ["ums"] = {"Pendau"}, ["umu"] = {"Munsee"}, ["una"] = {"North Watut"}, ["und"] = {"Undetermined"}, ["une"] = {"Uneme"}, ["ung"] = {"Ngarinyin"}, ["uni"] = {"Uni"}, ["unk"] = {"Enawené-Nawé"}, ["unm"] = {"Unami"}, ["unn"] = {"Kurnai"}, ["unr"] = {"Mundari"}, ["unu"] = {"Unubahe"}, ["unx"] = {"Munda"}, ["unz"] = {"Unde Kaili"}, ["uon"] = {"Kulon"}, ["upi"] = {"Umeda"}, ["upv"] = {"Uripiv-Wala-Rano-Atchin"}, ["ura"] = {"Urarina"}, ["urb"] = {"Urubú-Kaapor", "Kaapor"}, ["urc"] = {"Urningangg"}, ["ure"] = {"Uru"}, ["urf"] = {"Uradhi"}, ["urg"] = {"Urigina"}, ["urh"] = {"Urhobo"}, ["uri"] = {"Urim"}, ["urj"] = {"Uralic languages"}, ["urk"] = {"Urak Lawoi'"}, ["url"] = {"Urali"}, ["urm"] = {"Urapmin"}, ["urn"] = {"Uruangnirin"}, ["uro"] = {"Ura (Papua New Guinea)"}, ["urp"] = {"Uru-Pa-In"}, ["urr"] = {"Lehalurup", "Löyöp"}, ["urt"] = {"Urat"}, ["uru"] = {"Urumi"}, ["urv"] = {"Uruava"}, ["urw"] = {"Sop"}, ["urx"] = {"Urimo"}, ["ury"] = {"Orya"}, ["urz"] = {"Uru-Eu-Wau-Wau"}, ["usa"] = {"Usarufa"}, ["ush"] = {"Ushojo"}, ["usi"] = {"Usui"}, ["usk"] = {"Usaghade"}, ["usp"] = {"Uspanteco"}, ["uss"] = {"us-Saare"}, ["usu"] = {"Uya"}, ["uta"] = {"Otank"}, ["ute"] = {"Ute-Southern Paiute"}, ["uth"] = {"ut-Hun"}, ["utp"] = {"Amba (Solomon Islands)"}, ["utr"] = {"Etulo"}, ["utu"] = {"Utu"}, ["uum"] = {"Urum"}, ["uur"] = {"Ura (Vanuatu)"}, ["uuu"] = {"U"}, ["uve"] = {"West Uvean", "Fagauvea"}, ["uvh"] = {"Uri"}, ["uvl"] = {"Lote"}, ["uwa"] = {"Kuku-Uwanh"}, ["uya"] = {"Doko-Uyanga"}, ["uzn"] = {"Northern Uzbek"}, ["uzs"] = {"Southern Uzbek"}, ["vaa"] = {"Vaagri Booli"}, ["vae"] = {"Vale"}, ["vaf"] = {"Vafsi"}, ["vag"] = {"Vagla"}, ["vah"] = {"Varhadi-Nagpuri"}, ["vai"] = {"Vai"}, ["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"}, ["val"] = {"Vehes"}, ["vam"] = {"Vanimo"}, ["van"] = {"Valman"}, ["vao"] = {"Vao"}, ["vap"] = {"Vaiphei"}, ["var"] = {"Huarijio"}, ["vas"] = {"Vasavi"}, ["vau"] = {"Vanuma"}, ["vav"] = {"Varli"}, ["vay"] = {"Wayu"}, ["vbb"] = {"Southeast Babar"}, ["vbk"] = {"Southwestern Bontok"}, ["vec"] = {"Venetian"}, ["ved"] = {"Veddah"}, ["vel"] = {"Veluws"}, ["vem"] = {"Vemgo-Mabas"}, ["veo"] = {"Ventureño"}, ["vep"] = {"Veps"}, ["ver"] = {"Mom Jango"}, ["vgr"] = {"Vaghri"}, ["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"}, ["vic"] = {"Virgin Islands Creole English"}, ["vid"] = {"Vidunda"}, ["vif"] = {"Vili"}, ["vig"] = {"Viemo"}, ["vil"] = {"Vilela"}, ["vin"] = {"Vinza"}, ["vis"] = {"Vishavan"}, ["vit"] = {"Viti"}, ["viv"] = {"Iduna"}, ["vjk"] = {"Bajjika"}, ["vka"] = {"Kariyarra"}, ["vkj"] = {"Kujarge"}, ["vkk"] = {"Kaur"}, ["vkl"] = {"Kulisusu"}, ["vkm"] = {"Kamakan"}, ["vkn"] = {"Koro Nulu"}, ["vko"] = {"Kodeoha"}, ["vkp"] = {"Korlai Creole Portuguese"}, ["vkt"] = {"Tenggarong Kutai Malay"}, ["vku"] = {"Kurrama"}, ["vkz"] = {"Koro Zuba"}, ["vlp"] = {"Valpei"}, ["vls"] = {"Vlaams"}, ["vma"] = {"Martuyhunira"}, ["vmb"] = {"Barbaram"}, ["vmc"] = {"Juxtlahuaca Mixtec"}, ["vmd"] = {"Mudu Koraga"}, ["vme"] = {"East Masela"}, ["vmf"] = {"Mainfränkisch"}, ["vmg"] = {"Lungalunga"}, ["vmh"] = {"Maraghei"}, ["vmi"] = {"Miwa"}, ["vmj"] = {"Ixtayutla Mixtec"}, ["vmk"] = {"Makhuwa-Shirima"}, ["vml"] = {"Malgana"}, ["vmm"] = {"Mitlatongo Mixtec"}, ["vmp"] = {"Soyaltepec Mazatec"}, ["vmq"] = {"Soyaltepec Mixtec"}, ["vmr"] = {"Marenje"}, ["vms"] = {"Moksela"}, ["vmu"] = {"Muluridyi"}, ["vmv"] = {"Valley Maidu"}, ["vmw"] = {"Makhuwa"}, ["vmx"] = {"Tamazola Mixtec"}, ["vmy"] = {"Ayautla Mazatec"}, ["vmz"] = {"Mazatlán Mazatec"}, ["vnk"] = {"Vano", "Lovono"}, ["vnm"] = {"Vinmavis", "Neve'ei"}, ["vnp"] = {"Vunapu"}, ["vor"] = {"Voro"}, ["vot"] = {"Votic"}, ["vra"] = {"Vera'a"}, ["vro"] = {"Võro"}, ["vrs"] = {"Varisi"}, ["vrt"] = {"Burmbar", "Banam Bay"}, ["vsi"] = {"Moldova Sign Language"}, ["vsl"] = {"Venezuelan Sign Language"}, ["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"}, ["vto"] = {"Vitou"}, ["vum"] = {"Vumbu"}, ["vun"] = {"Vunjo"}, ["vut"] = {"Vute"}, ["vwa"] = {"Awa (China)"}, ["waa"] = {"Walla Walla"}, ["wab"] = {"Wab"}, ["wac"] = {"Wasco-Wishram"}, ["wad"] = {"Wamesa", "Wondama"}, ["wae"] = {"Walser"}, ["waf"] = {"Wakoná"}, ["wag"] = {"Wa'ema"}, ["wah"] = {"Watubela"}, ["wai"] = {"Wares"}, ["waj"] = {"Waffa"}, ["wak"] = {"Wakashan languages"}, ["wal"] = {"Wolaytta", "Wolaitta"}, ["wam"] = {"Wampanoag"}, ["wan"] = {"Wan"}, ["wao"] = {"Wappo"}, ["wap"] = {"Wapishana"}, ["waq"] = {"Wagiman"}, ["war"] = {"Waray (Philippines)"}, ["was"] = {"Washo"}, ["wat"] = {"Kaninuwa"}, ["wau"] = {"Waurá"}, ["wav"] = {"Waka"}, ["waw"] = {"Waiwai"}, ["wax"] = {"Watam", "Marangis"}, ["way"] = {"Wayana"}, ["waz"] = {"Wampur"}, ["wba"] = {"Warao"}, ["wbb"] = {"Wabo"}, ["wbe"] = {"Waritai"}, ["wbf"] = {"Wara"}, ["wbh"] = {"Wanda"}, ["wbi"] = {"Vwanji"}, ["wbj"] = {"Alagwa"}, ["wbk"] = {"Waigali"}, ["wbl"] = {"Wakhi"}, ["wbm"] = {"Wa"}, ["wbp"] = {"Warlpiri"}, ["wbq"] = {"Waddar"}, ["wbr"] = {"Wagdi"}, ["wbs"] = {"West Bengal Sign Language"}, ["wbt"] = {"Warnman"}, ["wbv"] = {"Wajarri"}, ["wbw"] = {"Woi"}, ["wca"] = {"Yanomámi"}, ["wci"] = {"Waci Gbe"}, ["wdd"] = {"Wandji"}, ["wdg"] = {"Wadaginam"}, ["wdj"] = {"Wadjiginy"}, ["wdk"] = {"Wadikali"}, ["wdt"] = {"Wendat"}, ["wdu"] = {"Wadjigu"}, ["wdy"] = {"Wadjabangayi"}, ["wea"] = {"Wewaw"}, ["wec"] = {"Wè Western"}, ["wed"] = {"Wedau"}, ["weg"] = {"Wergaia"}, ["weh"] = {"Weh"}, ["wei"] = {"Kiunum"}, ["wem"] = {"Weme Gbe"}, ["wen"] = {"Sorbian languages"}, ["weo"] = {"Wemale"}, ["wep"] = {"Westphalien"}, ["wer"] = {"Weri"}, ["wes"] = {"Cameroon Pidgin"}, ["wet"] = {"Perai"}, ["weu"] = {"Rawngtu Chin"}, ["wew"] = {"Wejewa"}, ["wfg"] = {"Yafi", "Zorop"}, ["wga"] = {"Wagaya"}, ["wgb"] = {"Wagawaga"}, ["wgg"] = {"Wangkangurru", "Wangganguru"}, ["wgi"] = {"Wahgi"}, ["wgo"] = {"Waigeo"}, ["wgu"] = {"Wirangu"}, ["wgy"] = {"Warrgamay"}, ["wha"] = {"Sou Upaa", "Manusela"}, ["whg"] = {"North Wahgi"}, ["whk"] = {"Wahau Kenyah"}, ["whu"] = {"Wahau Kayan"}, ["wib"] = {"Southern Toussian"}, ["wic"] = {"Wichita"}, ["wie"] = {"Wik-Epa"}, ["wif"] = {"Wik-Keyangan"}, ["wig"] = {"Wik Ngathan"}, ["wih"] = {"Wik-Me'anha"}, ["wii"] = {"Minidien"}, ["wij"] = {"Wik-Iiyanh"}, ["wik"] = {"Wikalkan"}, ["wil"] = {"Wilawila"}, ["wim"] = {"Wik-Mungkan"}, ["win"] = {"Ho-Chunk"}, ["wir"] = {"Wiraféd"}, ["wiu"] = {"Wiru"}, ["wiv"] = {"Vitu"}, ["wiy"] = {"Wiyot"}, ["wja"] = {"Waja"}, ["wji"] = {"Warji"}, ["wka"] = {"Kw'adza"}, ["wkb"] = {"Kumbaran"}, ["wkd"] = {"Wakde", "Mo"}, ["wkl"] = {"Kalanadi"}, ["wkr"] = {"Keerray-Woorroong"}, ["wku"] = {"Kunduvadi"}, ["wkw"] = {"Wakawaka"}, ["wky"] = {"Wangkayutyuru"}, ["wla"] = {"Walio"}, ["wlc"] = {"Mwali Comorian"}, ["wle"] = {"Wolane"}, ["wlg"] = {"Kunbarlang"}, ["wlh"] = {"Welaun"}, ["wli"] = {"Waioli"}, ["wlk"] = {"Wailaki"}, ["wll"] = {"Wali (Sudan)"}, ["wlm"] = {"Middle Welsh"}, ["wlo"] = {"Wolio"}, ["wlr"] = {"Wailapa"}, ["wls"] = {"Wallisian"}, ["wlu"] = {"Wuliwuli"}, ["wlv"] = {"Wichí Lhamtés Vejoz"}, ["wlw"] = {"Walak"}, ["wlx"] = {"Wali (Ghana)"}, ["wly"] = {"Waling"}, ["wma"] = {"Mawa (Nigeria)"}, ["wmb"] = {"Wambaya"}, ["wmc"] = {"Wamas"}, ["wmd"] = {"Mamaindé"}, ["wme"] = {"Wambule"}, ["wmg"] = {"Western Minyag"}, ["wmh"] = {"Waima'a"}, ["wmi"] = {"Wamin"}, ["wmm"] = {"Maiwa (Indonesia)"}, ["wmn"] = {"Waamwang"}, ["wmo"] = {"Wom (Papua New Guinea)"}, ["wms"] = {"Wambon"}, ["wmt"] = {"Walmajarri"}, ["wmw"] = {"Mwani"}, ["wmx"] = {"Womo"}, ["wnb"] = {"Mokati"}, ["wnc"] = {"Wantoat"}, ["wnd"] = {"Wandarang"}, ["wne"] = {"Waneci"}, ["wng"] = {"Wanggom"}, ["wni"] = {"Ndzwani Comorian"}, ["wnk"] = {"Wanukaka"}, ["wnm"] = {"Wanggamala"}, ["wnn"] = {"Wunumara"}, ["wno"] = {"Wano"}, ["wnp"] = {"Wanap"}, ["wnu"] = {"Usan"}, ["wnw"] = {"Wintu"}, ["wny"] = {"Wanyi", "Waanyi"}, ["woa"] = {"Kuwema", "Tyaraity"}, ["wob"] = {"Wè Northern"}, ["woc"] = {"Wogeo"}, ["wod"] = {"Wolani"}, ["woe"] = {"Woleaian"}, ["wof"] = {"Gambian Wolof"}, ["wog"] = {"Wogamusin"}, ["woi"] = {"Kamang"}, ["wok"] = {"Longto"}, ["wom"] = {"Wom (Nigeria)"}, ["won"] = {"Wongo"}, ["woo"] = {"Manombai"}, ["wor"] = {"Woria"}, ["wos"] = {"Hanga Hundi"}, ["wow"] = {"Wawonii"}, ["woy"] = {"Weyto"}, ["wpc"] = {"Maco"}, ["wrb"] = {"Waluwarra", "Warluwara"}, ["wrg"] = {"Warungu", "Gudjal"}, ["wrh"] = {"Wiradjuri"}, ["wri"] = {"Wariyangga"}, ["wrk"] = {"Garrwa"}, ["wrl"] = {"Warlmanpa"}, ["wrm"] = {"Warumungu"}, ["wrn"] = {"Warnang"}, ["wro"] = {"Worrorra"}, ["wrp"] = {"Waropen"}, ["wrr"] = {"Wardaman"}, ["wrs"] = {"Waris"}, ["wru"] = {"Waru"}, ["wrv"] = {"Waruna"}, ["wrw"] = {"Gugu Warra"}, ["wrx"] = {"Wae Rana"}, ["wry"] = {"Merwari"}, ["wrz"] = {"Waray (Australia)"}, ["wsa"] = {"Warembori"}, ["wsg"] = {"Adilabad Gondi"}, ["wsi"] = {"Wusi"}, ["wsk"] = {"Waskia"}, ["wsr"] = {"Owenia"}, ["wss"] = {"Wasa"}, ["wsu"] = {"Wasu"}, ["wsv"] = {"Wotapuri-Katarqalai"}, ["wtb"] = {"Matambwe"}, ["wtf"] = {"Watiwa"}, ["wth"] = {"Wathawurrung"}, ["wti"] = {"Berta"}, ["wtk"] = {"Watakataui"}, ["wtm"] = {"Mewati"}, ["wtw"] = {"Wotu"}, ["wua"] = {"Wikngenchera"}, ["wub"] = {"Wunambal"}, ["wud"] = {"Wudu"}, ["wuh"] = {"Wutunhua"}, ["wul"] = {"Silimo"}, ["wum"] = {"Wumbvu"}, ["wun"] = {"Bungu"}, ["wur"] = {"Wurrugu"}, ["wut"] = {"Wutung"}, ["wuu"] = {"Wu Chinese"}, ["wuv"] = {"Wuvulu-Aua"}, ["wux"] = {"Wulna"}, ["wuy"] = {"Wauyai"}, ["wwa"] = {"Waama"}, ["wwb"] = {"Wakabunga"}, ["wwo"] = {"Wetamut", "Dorig"}, ["wwr"] = {"Warrwa"}, ["www"] = {"Wawa"}, ["wxa"] = {"Waxianghua"}, ["wxw"] = {"Wardandi"}, ["wyb"] = {"Wangaaybuwan-Ngiyambaa"}, ["wyi"] = {"Woiwurrung"}, ["wym"] = {"Wymysorys"}, ["wyn"] = {"Wyandot"}, ["wyr"] = {"Wayoró"}, ["wyy"] = {"Western Fijian"}, ["xaa"] = {"Andalusian Arabic"}, ["xab"] = {"Sambe"}, ["xac"] = {"Kachari"}, ["xad"] = {"Adai"}, ["xae"] = {"Aequian"}, ["xag"] = {"Aghwan"}, ["xai"] = {"Kaimbé"}, ["xaj"] = {"Ararandewára"}, ["xak"] = {"Máku"}, ["xal"] = {"Kalmyk", "Oirat"}, ["xam"] = {"ǀXam"}, ["xan"] = {"Xamtanga"}, ["xao"] = {"Khao"}, ["xap"] = {"Apalachee"}, ["xaq"] = {"Aquitanian"}, ["xar"] = {"Karami"}, ["xas"] = {"Kamas"}, ["xat"] = {"Katawixi"}, ["xau"] = {"Kauwera"}, ["xav"] = {"Xavánte"}, ["xaw"] = {"Kawaiisu"}, ["xay"] = {"Kayan Mahakam"}, ["xbb"] = {"Lower Burdekin"}, ["xbc"] = {"Bactrian"}, ["xbd"] = {"Bindal"}, ["xbe"] = {"Bigambal"}, ["xbg"] = {"Bunganditj"}, ["xbi"] = {"Kombio"}, ["xbj"] = {"Birrpayi"}, ["xbm"] = {"Middle Breton"}, ["xbn"] = {"Kenaboi"}, ["xbo"] = {"Bolgarian"}, ["xbp"] = {"Bibbulman"}, ["xbr"] = {"Kambera"}, ["xbw"] = {"Kambiwá"}, ["xby"] = {"Batjala", "Batyala"}, ["xcb"] = {"Cumbric"}, ["xcc"] = {"Camunic"}, ["xce"] = {"Celtiberian"}, ["xcg"] = {"Cisalpine Gaulish"}, ["xch"] = {"Chemakum", "Chimakum"}, ["xcl"] = {"Classical Armenian"}, ["xcm"] = {"Comecrudo"}, ["xcn"] = {"Cotoname"}, ["xco"] = {"Chorasmian"}, ["xcr"] = {"Carian"}, ["xct"] = {"Classical Tibetan"}, ["xcu"] = {"Curonian"}, ["xcv"] = {"Chuvantsy"}, ["xcw"] = {"Coahuilteco"}, ["xcy"] = {"Cayuse"}, ["xda"] = {"Darkinyung"}, ["xdc"] = {"Dacian"}, ["xdk"] = {"Dharuk"}, ["xdm"] = {"Edomite"}, ["xdo"] = {"Kwandu"}, ["xdq"] = {"Kaitag"}, ["xdy"] = {"Malayic Dayak"}, ["xeb"] = {"Eblan"}, ["xed"] = {"Hdi"}, ["xeg"] = {"ǁXegwi"}, ["xel"] = {"Kelo"}, ["xem"] = {"Kembayan"}, ["xep"] = {"Epi-Olmec"}, ["xer"] = {"Xerénte"}, ["xes"] = {"Kesawai"}, ["xet"] = {"Xetá"}, ["xeu"] = {"Keoru-Ahia"}, ["xfa"] = {"Faliscan"}, ["xga"] = {"Galatian"}, ["xgb"] = {"Gbin"}, ["xgd"] = {"Gudang"}, ["xgf"] = {"Gabrielino-Fernandeño"}, ["xgg"] = {"Goreng"}, ["xgi"] = {"Garingbal"}, ["xgl"] = {"Galindan"}, ["xgm"] = {"Dharumbal", "Guwinmal"}, ["xgn"] = {"Mongolian languages"}, ["xgr"] = {"Garza"}, ["xgu"] = {"Unggumi"}, ["xgw"] = {"Guwa"}, ["xha"] = {"Harami"}, ["xhc"] = {"Hunnic"}, ["xhd"] = {"Hadrami"}, ["xhe"] = {"Khetrani"}, ["xhm"] = {"Middle Khmer (1400 to 1850 CE)"}, ["xhr"] = {"Hernican"}, ["xht"] = {"Hattic"}, ["xhu"] = {"Hurrian"}, ["xhv"] = {"Khua"}, ["xib"] = {"Iberian"}, ["xii"] = {"Xiri"}, ["xil"] = {"Illyrian"}, ["xin"] = {"Xinca"}, ["xir"] = {"Xiriâna"}, ["xis"] = {"Kisan"}, ["xiv"] = {"Indus Valley Language"}, ["xiy"] = {"Xipaya"}, ["xjb"] = {"Minjungbal"}, ["xjt"] = {"Jaitmatang"}, ["xka"] = {"Kalkoti"}, ["xkb"] = {"Northern Nago"}, ["xkc"] = {"Kho'ini"}, ["xkd"] = {"Mendalam Kayan"}, ["xke"] = {"Kereho"}, ["xkf"] = {"Khengkha"}, ["xkg"] = {"Kagoro"}, ["xki"] = {"Kenyan Sign Language"}, ["xkj"] = {"Kajali"}, ["xkk"] = {"Kachok", "Kaco'"}, ["xkl"] = {"Mainstream Kenyah"}, ["xkn"] = {"Kayan River Kayan"}, ["xko"] = {"Kiorr"}, ["xkp"] = {"Kabatei"}, ["xkq"] = {"Koroni"}, ["xkr"] = {"Xakriabá"}, ["xks"] = {"Kumbewaha"}, ["xkt"] = {"Kantosi"}, ["xku"] = {"Kaamba"}, ["xkv"] = {"Kgalagadi"}, ["xkw"] = {"Kembra"}, ["xkx"] = {"Karore"}, ["xky"] = {"Uma' Lasan"}, ["xkz"] = {"Kurtokha"}, ["xla"] = {"Kamula"}, ["xlb"] = {"Loup B"}, ["xlc"] = {"Lycian"}, ["xld"] = {"Lydian"}, ["xle"] = {"Lemnian"}, ["xlg"] = {"Ligurian (Ancient)"}, ["xli"] = {"Liburnian"}, ["xln"] = {"Alanic"}, ["xlo"] = {"Loup A"}, ["xlp"] = {"Lepontic"}, ["xls"] = {"Lusitanian"}, ["xlu"] = {"Cuneiform Luwian"}, ["xly"] = {"Elymian"}, ["xma"] = {"Mushungulu"}, ["xmb"] = {"Mbonga"}, ["xmc"] = {"Makhuwa-Marrevone"}, ["xmd"] = {"Mbudum"}, ["xme"] = {"Median"}, ["xmf"] = {"Mingrelian"}, ["xmg"] = {"Mengaka"}, ["xmh"] = {"Kugu-Muminh"}, ["xmj"] = {"Majera"}, ["xmk"] = {"Ancient Macedonian"}, ["xml"] = {"Malaysian Sign Language"}, ["xmm"] = {"Manado Malay"}, ["xmn"] = {"Manichaean Middle Persian"}, ["xmo"] = {"Morerebi"}, ["xmp"] = {"Kuku-Mu'inh"}, ["xmq"] = {"Kuku-Mangk"}, ["xmr"] = {"Meroitic"}, ["xms"] = {"Moroccan Sign Language"}, ["xmt"] = {"Matbat"}, ["xmu"] = {"Kamu"}, ["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"}, ["xmw"] = {"Tsimihety Malagasy"}, ["xmx"] = {"Salawati", "Maden"}, ["xmy"] = {"Mayaguduna"}, ["xmz"] = {"Mori Bawah"}, ["xna"] = {"Ancient North Arabian"}, ["xnb"] = {"Kanakanabu"}, ["xnd"] = {"Na-Dene languages"}, ["xng"] = {"Middle Mongolian"}, ["xnh"] = {"Kuanhua"}, ["xni"] = {"Ngarigu"}, ["xnj"] = {"Ngoni (Tanzania)"}, ["xnk"] = {"Nganakarti"}, ["xnm"] = {"Ngumbarl"}, ["xnn"] = {"Northern Kankanay"}, ["xno"] = {"Anglo-Norman"}, ["xnq"] = {"Ngoni (Mozambique)"}, ["xnr"] = {"Kangri"}, ["xns"] = {"Kanashi"}, ["xnt"] = {"Narragansett"}, ["xnu"] = {"Nukunul"}, ["xny"] = {"Nyiyaparli"}, ["xnz"] = {"Kenzi", "Mattoki"}, ["xoc"] = {"O'chi'chi'"}, ["xod"] = {"Kokoda"}, ["xog"] = {"Soga"}, ["xoi"] = {"Kominimung"}, ["xok"] = {"Xokleng"}, ["xom"] = {"Komo (Sudan)"}, ["xon"] = {"Konkomba"}, ["xoo"] = {"Xukurú"}, ["xop"] = {"Kopar"}, ["xor"] = {"Korubo"}, ["xow"] = {"Kowaki"}, ["xpa"] = {"Pirriya"}, ["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"}, ["xpc"] = {"Pecheneg"}, ["xpd"] = {"Oyster Bay Tasmanian"}, ["xpe"] = {"Liberia Kpelle"}, ["xpf"] = {"Southeast Tasmanian", "Nuenonne"}, ["xpg"] = {"Phrygian"}, ["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"}, ["xpi"] = {"Pictish"}, ["xpj"] = {"Mpalitjanh"}, ["xpk"] = {"Kulina Pano"}, ["xpl"] = {"Port Sorell Tasmanian"}, ["xpm"] = {"Pumpokol"}, ["xpn"] = {"Kapinawá"}, ["xpo"] = {"Pochutec"}, ["xpp"] = {"Puyo-Paekche"}, ["xpq"] = {"Mohegan-Pequot"}, ["xpr"] = {"Parthian"}, ["xps"] = {"Pisidian"}, ["xpt"] = {"Punthamara"}, ["xpu"] = {"Punic"}, ["xpv"] = {"Northern Tasmanian", "Tommeginne"}, ["xpw"] = {"Northwestern Tasmanian", "Peerapper"}, ["xpx"] = {"Southwestern Tasmanian", "Toogee"}, ["xpy"] = {"Puyo"}, ["xpz"] = {"Bruny Island Tasmanian"}, ["xqa"] = {"Karakhanid"}, ["xqt"] = {"Qatabanian"}, ["xra"] = {"Krahô"}, ["xrb"] = {"Eastern Karaboro"}, ["xrd"] = {"Gundungurra"}, ["xre"] = {"Kreye"}, ["xrg"] = {"Minang"}, ["xri"] = {"Krikati-Timbira"}, ["xrm"] = {"Armazic"}, ["xrn"] = {"Arin"}, ["xrr"] = {"Raetic"}, ["xrt"] = {"Aranama-Tamique"}, ["xru"] = {"Marriammu"}, ["xrw"] = {"Karawa"}, ["xsa"] = {"Sabaean"}, ["xsb"] = {"Sambal"}, ["xsc"] = {"Scythian"}, ["xsd"] = {"Sidetic"}, ["xse"] = {"Sempan"}, ["xsh"] = {"Shamang"}, ["xsi"] = {"Sio"}, ["xsj"] = {"Subi"}, ["xsl"] = {"South Slavey"}, ["xsm"] = {"Kasem"}, ["xsn"] = {"Sanga (Nigeria)"}, ["xso"] = {"Solano"}, ["xsp"] = {"Silopi"}, ["xsq"] = {"Makhuwa-Saka"}, ["xsr"] = {"Sherpa"}, ["xsu"] = {"Sanumá"}, ["xsv"] = {"Sudovian"}, ["xsy"] = {"Saisiyat"}, ["xta"] = {"Alcozauca Mixtec"}, ["xtb"] = {"Chazumba Mixtec"}, ["xtc"] = {"Katcha-Kadugli-Miri"}, ["xtd"] = {"Diuxi-Tilantongo Mixtec"}, ["xte"] = {"Ketengban"}, ["xtg"] = {"Transalpine Gaulish"}, ["xth"] = {"Yitha Yitha"}, ["xti"] = {"Sinicahua Mixtec"}, ["xtj"] = {"San Juan Teita Mixtec"}, ["xtl"] = {"Tijaltepec Mixtec"}, ["xtm"] = {"Magdalena Peñasco Mixtec"}, ["xtn"] = {"Northern Tlaxiaco Mixtec"}, ["xto"] = {"Tokharian A"}, ["xtp"] = {"San Miguel Piedras Mixtec"}, ["xtq"] = {"Tumshuqese"}, ["xtr"] = {"Early Tripuri"}, ["xts"] = {"Sindihui Mixtec"}, ["xtt"] = {"Tacahua Mixtec"}, ["xtu"] = {"Cuyamecalco Mixtec"}, ["xtv"] = {"Thawa"}, ["xtw"] = {"Tawandê"}, ["xty"] = {"Yoloxochitl Mixtec"}, ["xua"] = {"Alu Kurumba"}, ["xub"] = {"Betta Kurumba"}, ["xud"] = {"Umiida"}, ["xug"] = {"Kunigami"}, ["xuj"] = {"Jennu Kurumba"}, ["xul"] = {"Ngunawal", "Nunukul"}, ["xum"] = {"Umbrian"}, ["xun"] = {"Unggaranggu"}, ["xuo"] = {"Kuo"}, ["xup"] = {"Upper Umpqua"}, ["xur"] = {"Urartian"}, ["xut"] = {"Kuthant"}, ["xuu"] = {"Kxoe", "Khwedam"}, ["xve"] = {"Venetic"}, ["xvi"] = {"Kamviri"}, ["xvn"] = {"Vandalic"}, ["xvo"] = {"Volscian"}, ["xvs"] = {"Vestinian"}, ["xwa"] = {"Kwaza"}, ["xwc"] = {"Woccon"}, ["xwd"] = {"Wadi Wadi"}, ["xwe"] = {"Xwela Gbe"}, ["xwg"] = {"Kwegu"}, ["xwj"] = {"Wajuk"}, ["xwk"] = {"Wangkumara"}, ["xwl"] = {"Western Xwla Gbe"}, ["xwo"] = {"Written Oirat"}, ["xwr"] = {"Kwerba Mamberamo"}, ["xwt"] = {"Wotjobaluk"}, ["xww"] = {"Wemba Wemba"}, ["xxb"] = {"Boro (Ghana)"}, ["xxk"] = {"Ke'o"}, ["xxm"] = {"Minkin"}, ["xxr"] = {"Koropó"}, ["xxt"] = {"Tambora"}, ["xya"] = {"Yaygir"}, ["xyb"] = {"Yandjibara"}, ["xyj"] = {"Mayi-Yapi"}, ["xyk"] = {"Mayi-Kulan"}, ["xyl"] = {"Yalakalore"}, ["xyt"] = {"Mayi-Thakurti"}, ["xyy"] = {"Yorta Yorta"}, ["xzh"] = {"Zhang-Zhung"}, ["xzm"] = {"Zemgalian"}, ["xzp"] = {"Ancient Zapotec"}, ["yaa"] = {"Yaminahua"}, ["yab"] = {"Yuhup"}, ["yac"] = {"Pass Valley Yali"}, ["yad"] = {"Yagua"}, ["yae"] = {"Pumé"}, ["yaf"] = {"Yaka (Democratic Republic of Congo)"}, ["yag"] = {"Yámana"}, ["yah"] = {"Yazgulyam"}, ["yai"] = {"Yagnobi"}, ["yaj"] = {"Banda-Yangere"}, ["yak"] = {"Yakama"}, ["yal"] = {"Yalunka"}, ["yam"] = {"Yamba"}, ["yan"] = {"Mayangna"}, ["yao"] = {"Yao"}, ["yap"] = {"Yapese"}, ["yaq"] = {"Yaqui"}, ["yar"] = {"Yabarana"}, ["yas"] = {"Nugunu (Cameroon)"}, ["yat"] = {"Yambeta"}, ["yau"] = {"Yuwana"}, ["yav"] = {"Yangben"}, ["yaw"] = {"Yawalapití"}, ["yax"] = {"Yauma"}, ["yay"] = {"Agwagwune"}, ["yaz"] = {"Lokaa"}, ["yba"] = {"Yala"}, ["ybb"] = {"Yemba"}, ["ybe"] = {"West Yugur"}, ["ybh"] = {"Yakha"}, ["ybi"] = {"Yamphu"}, ["ybj"] = {"Hasha"}, ["ybk"] = {"Bokha"}, ["ybl"] = {"Yukuben"}, ["ybm"] = {"Yaben"}, ["ybn"] = {"Yabaâna"}, ["ybo"] = {"Yabong"}, ["ybx"] = {"Yawiyo"}, ["yby"] = {"Yaweyuha"}, ["ych"] = {"Chesu"}, ["ycl"] = {"Lolopo"}, ["ycn"] = {"Yucuna"}, ["ycp"] = {"Chepya"}, ["ycr"] = {"Yilan Creole"}, ["yda"] = {"Yanda"}, ["ydd"] = {"Eastern Yiddish"}, ["yde"] = {"Yangum Dey"}, ["ydg"] = {"Yidgha"}, ["ydk"] = {"Yoidik"}, ["yea"] = {"Ravula"}, ["yec"] = {"Yeniche"}, ["yee"] = {"Yimas"}, ["yei"] = {"Yeni"}, ["yej"] = {"Yevanic"}, ["yel"] = {"Yela"}, ["yer"] = {"Tarok"}, ["yes"] = {"Nyankpa"}, ["yet"] = {"Yetfa"}, ["yeu"] = {"Yerukula"}, ["yev"] = {"Yapunda"}, ["yey"] = {"Yeyi"}, ["yga"] = {"Malyangapa"}, ["ygi"] = {"Yiningayi"}, ["ygl"] = {"Yangum Gel"}, ["ygm"] = {"Yagomi"}, ["ygp"] = {"Gepo"}, ["ygr"] = {"Yagaria"}, ["ygs"] = {"Yolŋu Sign Language"}, ["ygu"] = {"Yugul"}, ["ygw"] = {"Yagwoia"}, ["yha"] = {"Baha Buyang"}, ["yhd"] = {"Judeo-Iraqi Arabic"}, ["yhl"] = {"Hlepho Phowa"}, ["yhs"] = {"Yan-nhaŋu Sign Language"}, ["yia"] = {"Yinggarda"}, ["yif"] = {"Ache"}, ["yig"] = {"Wusa Nasu"}, ["yih"] = {"Western Yiddish"}, ["yii"] = {"Yidiny"}, ["yij"] = {"Yindjibarndi"}, ["yik"] = {"Dongshanba Lalo"}, ["yil"] = {"Yindjilandji"}, ["yim"] = {"Yimchungru Naga"}, ["yin"] = {"Riang Lai", "Yinchia"}, ["yip"] = {"Pholo"}, ["yiq"] = {"Miqie"}, ["yir"] = {"North Awyu"}, ["yis"] = {"Yis"}, ["yit"] = {"Eastern Lalu"}, ["yiu"] = {"Awu"}, ["yiv"] = {"Northern Nisu"}, ["yix"] = {"Axi Yi"}, ["yiz"] = {"Azhe"}, ["yka"] = {"Yakan"}, ["ykg"] = {"Northern Yukaghir"}, ["ykh"] = {"Khamnigan Mongol"}, ["yki"] = {"Yoke"}, ["ykk"] = {"Yakaikeke"}, ["ykl"] = {"Khlula"}, ["ykm"] = {"Kap"}, ["ykn"] = {"Kua-nsi"}, ["yko"] = {"Yasa"}, ["ykr"] = {"Yekora"}, ["ykt"] = {"Kathu"}, ["yku"] = {"Kuamasi"}, ["yky"] = {"Yakoma"}, ["yla"] = {"Yaul"}, ["ylb"] = {"Yaleba"}, ["yle"] = {"Yele"}, ["ylg"] = {"Yelogu"}, ["yli"] = {"Angguruk Yali"}, ["yll"] = {"Yil"}, ["ylm"] = {"Limi"}, ["yln"] = {"Langnian Buyang"}, ["ylo"] = {"Naluo Yi"}, ["ylr"] = {"Yalarnnga"}, ["ylu"] = {"Aribwaung"}, ["yly"] = {"Nyâlayu", "Nyelâyu"}, ["ymb"] = {"Yambes"}, ["ymc"] = {"Southern Muji"}, ["ymd"] = {"Muda"}, ["yme"] = {"Yameo"}, ["ymg"] = {"Yamongeri"}, ["ymh"] = {"Mili"}, ["ymi"] = {"Moji"}, ["ymk"] = {"Makwe"}, ["yml"] = {"Iamalele"}, ["ymm"] = {"Maay"}, ["ymn"] = {"Yamna", "Sunum"}, ["ymo"] = {"Yangum Mon"}, ["ymp"] = {"Yamap"}, ["ymq"] = {"Qila Muji"}, ["ymr"] = {"Malasar"}, ["yms"] = {"Mysian"}, ["ymx"] = {"Northern Muji"}, ["ymz"] = {"Muzi"}, ["yna"] = {"Aluo"}, ["ynd"] = {"Yandruwandha"}, ["yne"] = {"Lang'e"}, ["yng"] = {"Yango"}, ["ynk"] = {"Naukan Yupik"}, ["ynl"] = {"Yangulam"}, ["ynn"] = {"Yana"}, ["yno"] = {"Yong"}, ["ynq"] = {"Yendang"}, ["yns"] = {"Yansi"}, ["ynu"] = {"Yahuna"}, ["yob"] = {"Yoba"}, ["yog"] = {"Yogad"}, ["yoi"] = {"Yonaguni"}, ["yok"] = {"Yokuts"}, ["yol"] = {"Yola"}, ["yom"] = {"Yombe"}, ["yon"] = {"Yongkom"}, ["yot"] = {"Yotti"}, ["yox"] = {"Yoron"}, ["yoy"] = {"Yoy"}, ["ypa"] = {"Phala"}, ["ypb"] = {"Labo Phowa"}, ["ypg"] = {"Phola"}, ["yph"] = {"Phupha"}, ["ypk"] = {"Yupik languages"}, ["ypm"] = {"Phuma"}, ["ypn"] = {"Ani Phowa"}, ["ypo"] = {"Alo Phola"}, ["ypp"] = {"Phupa"}, ["ypz"] = {"Phuza"}, ["yra"] = {"Yerakai"}, ["yrb"] = {"Yareba"}, ["yre"] = {"Yaouré"}, ["yrk"] = {"Nenets"}, ["yrl"] = {"Nhengatu"}, ["yrm"] = {"Yirrk-Mel"}, ["yrn"] = {"Yerong"}, ["yro"] = {"Yaroamë"}, ["yrs"] = {"Yarsun"}, ["yrw"] = {"Yarawata"}, ["yry"] = {"Yarluyandi"}, ["ysc"] = {"Yassic"}, ["ysd"] = {"Samatao"}, ["ysg"] = {"Sonaga"}, ["ysl"] = {"Yugoslavian Sign Language"}, ["ysm"] = {"Myanmar Sign Language"}, ["ysn"] = {"Sani"}, ["yso"] = {"Nisi (China)"}, ["ysp"] = {"Southern Lolopo"}, ["ysr"] = {"Sirenik Yupik"}, ["yss"] = {"Yessan-Mayo"}, ["ysy"] = {"Sanie"}, ["yta"] = {"Talu"}, ["ytl"] = {"Tanglang"}, ["ytp"] = {"Thopho"}, ["ytw"] = {"Yout Wam"}, ["yty"] = {"Yatay"}, ["yua"] = {"Yucateco", "Yucatec Maya"}, ["yub"] = {"Yugambal"}, ["yuc"] = {"Yuchi"}, ["yud"] = {"Judeo-Tripolitanian Arabic"}, ["yue"] = {"Yue Chinese", "Cantonese"}, ["yuf"] = {"Havasupai-Walapai-Yavapai"}, ["yug"] = {"Yug"}, ["yui"] = {"Yurutí"}, ["yuj"] = {"Karkar-Yuri"}, ["yuk"] = {"Yuki"}, ["yul"] = {"Yulu"}, ["yum"] = {"Quechan"}, ["yun"] = {"Bena (Nigeria)"}, ["yup"] = {"Yukpa"}, ["yuq"] = {"Yuqui"}, ["yur"] = {"Yurok"}, ["yut"] = {"Yopno"}, ["yuw"] = {"Yau (Morobe Province)"}, ["yux"] = {"Southern Yukaghir"}, ["yuy"] = {"East Yugur"}, ["yuz"] = {"Yuracare"}, ["yva"] = {"Yawa"}, ["yvt"] = {"Yavitero"}, ["ywa"] = {"Kalou"}, ["ywg"] = {"Yinhawangka"}, ["ywl"] = {"Western Lalu"}, ["ywn"] = {"Yawanawa"}, ["ywq"] = {"Wuding-Luquan Yi"}, ["ywr"] = {"Yawuru"}, ["ywt"] = {"Xishanba Lalo", "Central Lalo"}, ["ywu"] = {"Wumeng Nasu"}, ["yww"] = {"Yawarawarga"}, ["yxa"] = {"Mayawali"}, ["yxg"] = {"Yagara"}, ["yxl"] = {"Yardliyawarra"}, ["yxm"] = {"Yinwum"}, ["yxu"] = {"Yuyu"}, ["yxy"] = {"Yabula Yabula"}, ["yyr"] = {"Yir Yoront"}, ["yyu"] = {"Yau (Sandaun Province)"}, ["yyz"] = {"Ayizi"}, ["yzg"] = {"E'ma Buyang"}, ["yzk"] = {"Zokhuo"}, ["zaa"] = {"Sierra de Juárez Zapotec"}, ["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"}, ["zac"] = {"Ocotlán Zapotec"}, ["zad"] = {"Cajonos Zapotec"}, ["zae"] = {"Yareni Zapotec"}, ["zaf"] = {"Ayoquesco Zapotec"}, ["zag"] = {"Zaghawa"}, ["zah"] = {"Zangwal"}, ["zai"] = {"Isthmus Zapotec"}, ["zaj"] = {"Zaramo"}, ["zak"] = {"Zanaki"}, ["zal"] = {"Zauzou"}, ["zam"] = {"Miahuatlán Zapotec"}, ["zao"] = {"Ozolotepec Zapotec"}, ["zap"] = {"Zapotec"}, ["zaq"] = {"Aloápam Zapotec"}, ["zar"] = {"Rincón Zapotec"}, ["zas"] = {"Santo Domingo Albarradas Zapotec"}, ["zat"] = {"Tabaa Zapotec"}, ["zau"] = {"Zangskari"}, ["zav"] = {"Yatzachi Zapotec"}, ["zaw"] = {"Mitla Zapotec"}, ["zax"] = {"Xadani Zapotec"}, ["zay"] = {"Zayse-Zergulla", "Zaysete"}, ["zaz"] = {"Zari"}, ["zba"] = {"Balaibalan"}, ["zbc"] = {"Central Berawan"}, ["zbe"] = {"East Berawan"}, ["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"}, ["zbt"] = {"Batui"}, ["zbu"] = {"Bu (Bauchi State)"}, ["zbw"] = {"West Berawan"}, ["zca"] = {"Coatecas Altas Zapotec"}, ["zcd"] = {"Las Delicias Zapotec"}, ["zch"] = {"Central Hongshuihe Zhuang"}, ["zdj"] = {"Ngazidja Comorian"}, ["zea"] = {"Zeeuws"}, ["zeg"] = {"Zenag"}, ["zeh"] = {"Eastern Hongshuihe Zhuang"}, ["zem"] = {"Zeem"}, ["zen"] = {"Zenaga"}, ["zga"] = {"Kinga"}, ["zgb"] = {"Guibei Zhuang"}, ["zgh"] = {"Standard Moroccan Tamazight"}, ["zgm"] = {"Minz Zhuang"}, ["zgn"] = {"Guibian Zhuang"}, ["zgr"] = {"Magori"}, ["zhb"] = {"Zhaba"}, ["zhd"] = {"Dai Zhuang"}, ["zhi"] = {"Zhire"}, ["zhn"] = {"Nong Zhuang"}, ["zhw"] = {"Zhoa"}, ["zhx"] = {"Chinese (family)"}, ["zia"] = {"Zia"}, ["zib"] = {"Zimbabwe Sign Language"}, ["zik"] = {"Zimakani"}, ["zil"] = {"Zialo"}, ["zim"] = {"Mesme"}, ["zin"] = {"Zinza"}, ["ziw"] = {"Zigula"}, ["ziz"] = {"Zizilivakan"}, ["zka"] = {"Kaimbulawa"}, ["zkd"] = {"Kadu"}, ["zkg"] = {"Koguryo"}, ["zkh"] = {"Khorezmian"}, ["zkk"] = {"Karankawa"}, ["zkn"] = {"Kanan"}, ["zko"] = {"Kott"}, ["zkp"] = {"São Paulo Kaingáng"}, ["zkr"] = {"Zakhring"}, ["zkt"] = {"Kitan"}, ["zku"] = {"Kaurna"}, ["zkv"] = {"Krevinian"}, ["zkz"] = {"Khazar"}, ["zla"] = {"Zula"}, ["zle"] = {"East Slavic languages"}, ["zlj"] = {"Liujiang Zhuang"}, ["zlm"] = {"Malay (individual language)"}, ["zln"] = {"Lianshan Zhuang"}, ["zlq"] = {"Liuqian Zhuang"}, ["zls"] = {"South Slavic languages"}, ["zlu"] = {"Zul"}, ["zlw"] = {"West Slavic languages"}, ["zma"] = {"Manda (Australia)"}, ["zmb"] = {"Zimba"}, ["zmc"] = {"Margany"}, ["zmd"] = {"Maridan"}, ["zme"] = {"Mangerr"}, ["zmf"] = {"Mfinu"}, ["zmg"] = {"Marti Ke"}, ["zmh"] = {"Makolkol"}, ["zmi"] = {"Negeri Sembilan Malay"}, ["zmj"] = {"Maridjabin"}, ["zmk"] = {"Mandandanyi"}, ["zml"] = {"Matngala"}, ["zmm"] = {"Marimanindji", "Marramaninyshi"}, ["zmn"] = {"Mbangwe"}, ["zmo"] = {"Molo"}, ["zmp"] = {"Mpuono"}, ["zmq"] = {"Mituku"}, ["zmr"] = {"Maranunggu"}, ["zms"] = {"Mbesa"}, ["zmt"] = {"Maringarr"}, ["zmu"] = {"Muruwari"}, ["zmv"] = {"Mbariman-Gudhinma"}, ["zmw"] = {"Mbo (Democratic Republic of Congo)"}, ["zmx"] = {"Bomitaba"}, ["zmy"] = {"Mariyedi"}, ["zmz"] = {"Mbandja"}, ["zna"] = {"Zan Gula"}, ["znd"] = {"Zande languages"}, ["zne"] = {"Zande (individual language)"}, ["zng"] = {"Mang"}, ["znk"] = {"Manangkari"}, ["zns"] = {"Mangas"}, ["zoc"] = {"Copainalá Zoque"}, ["zoh"] = {"Chimalapa Zoque"}, ["zom"] = {"Zou"}, ["zoo"] = {"Asunción Mixtepec Zapotec"}, ["zoq"] = {"Tabasco Zoque"}, ["zor"] = {"Rayón Zoque"}, ["zos"] = {"Francisco León Zoque"}, ["zpa"] = {"Lachiguiri Zapotec"}, ["zpb"] = {"Yautepec Zapotec"}, ["zpc"] = {"Choapan Zapotec"}, ["zpd"] = {"Southeastern Ixtlán Zapotec"}, ["zpe"] = {"Petapa Zapotec"}, ["zpf"] = {"San Pedro Quiatoni Zapotec"}, ["zpg"] = {"Guevea De Humboldt Zapotec"}, ["zph"] = {"Totomachapan Zapotec"}, ["zpi"] = {"Santa María Quiegolani Zapotec"}, ["zpj"] = {"Quiavicuzas Zapotec"}, ["zpk"] = {"Tlacolulita Zapotec"}, ["zpl"] = {"Lachixío Zapotec"}, ["zpm"] = {"Mixtepec Zapotec"}, ["zpn"] = {"Santa Inés Yatzechi Zapotec"}, ["zpo"] = {"Amatlán Zapotec"}, ["zpp"] = {"El Alto Zapotec"}, ["zpq"] = {"Zoogocho Zapotec"}, ["zpr"] = {"Santiago Xanica Zapotec"}, ["zps"] = {"Coatlán Zapotec"}, ["zpt"] = {"San Vicente Coatlán Zapotec"}, ["zpu"] = {"Yalálag Zapotec"}, ["zpv"] = {"Chichicapan Zapotec"}, ["zpw"] = {"Zaniza Zapotec"}, ["zpx"] = {"San Baltazar Loxicha Zapotec"}, ["zpy"] = {"Mazaltepec Zapotec"}, ["zpz"] = {"Texmelucan Zapotec"}, ["zqe"] = {"Qiubei Zhuang"}, ["zra"] = {"Kara (Korea)"}, ["zrg"] = {"Mirgan"}, ["zrn"] = {"Zerenkel"}, ["zro"] = {"Záparo"}, ["zrp"] = {"Zarphatic"}, ["zrs"] = {"Mairasi"}, ["zsa"] = {"Sarasira"}, ["zsk"] = {"Kaskean"}, ["zsl"] = {"Zambian Sign Language"}, ["zsm"] = {"Standard Malay"}, ["zsr"] = {"Southern Rincon Zapotec"}, ["zsu"] = {"Sukurum"}, ["zte"] = {"Elotepec Zapotec"}, ["ztg"] = {"Xanaguía Zapotec"}, ["ztl"] = {"Lapaguía-Guivini Zapotec"}, ["ztm"] = {"San Agustín Mixtepec Zapotec"}, ["ztn"] = {"Santa Catarina Albarradas Zapotec"}, ["ztp"] = {"Loxicha Zapotec"}, ["ztq"] = {"Quioquitani-Quierí Zapotec"}, ["zts"] = {"Tilquiapan Zapotec"}, ["ztt"] = {"Tejalapan Zapotec"}, ["ztu"] = {"Güilá Zapotec"}, ["ztx"] = {"Zaachila Zapotec"}, ["zty"] = {"Yatee Zapotec"}, ["zuh"] = {"Tokano"}, ["zum"] = {"Kumzari"}, ["zun"] = {"Zuni"}, ["zuy"] = {"Zumaya"}, ["zwa"] = {"Zay"}, ["zxx"] = {"No linguistic content", "Not applicable"}, ["zyb"] = {"Yongbei Zhuang"}, ["zyg"] = {"Yang Zhuang"}, ["zyj"] = {"Youjiang Zhuang"}, ["zyn"] = {"Yongnan Zhuang"}, ["zyp"] = {"Zyphe Chin"}, ["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"}, ["zzj"] = {"Zuojiang Zhuang"} } local deprecated = { ["in"] = {"Indonesian"}, ["iw"] = {"Hebrew"}, ["ji"] = {"Yiddish"}, ["jw"] = {"Javanese"}, ["mo"] = {"Moldavian", "Moldovan"}, ["aam"] = {"Aramanik"}, ["adp"] = {"Adap"}, ["agp"] = {"Paranan"}, ["ais"] = {"Nataoran Amis"}, ["ajp"] = {"South Levantine Arabic"}, ["ajt"] = {"Judeo-Tunisian Arabic"}, ["aoh"] = {"Arma"}, ["asd"] = {"Asas"}, ["aue"] = {"ǂKxʼauǁʼein"}, ["ayx"] = {"Ayi (China)"}, ["ayy"] = {"Tayabas Ayta"}, ["baz"] = {"Tunen"}, ["bbz"] = {"Babalia Creole Arabic"}, ["bgm"] = {"Baga Mboteni"}, ["bhk"] = {"Albay Bicolano"}, ["bic"] = {"Bikaru"}, ["bij"] = {"Vaghat-Ya-Bijim-Legeri"}, ["bjd"] = {"Bandjigali"}, ["bjq"] = {"Southern Betsimisaraka Malagasy"}, ["bkb"] = {"Finallig"}, ["blg"] = {"Balau"}, ["bmy"] = {"Bemba (Democratic Republic of Congo)"}, ["bpb"] = {"Barbacoas"}, ["btb"] = {"Beti (Cameroon)"}, ["btl"] = {"Bhatola"}, ["bxx"] = {"Borna (Democratic Republic of Congo)"}, ["byy"] = {"Buya"}, ["cbe"] = {"Chipiajes"}, ["cbh"] = {"Cagua"}, ["cca"] = {"Cauca"}, ["ccq"] = {"Chaungtha"}, ["cdg"] = {"Chamari"}, ["cjr"] = {"Chorotega"}, ["cka"] = {"Khumi Awa Chin"}, ["cmk"] = {"Chimakum"}, ["coy"] = {"Coyaima"}, ["cqu"] = {"Chilean Quechua"}, ["cug"] = {"Chungmboko", "Cung"}, ["cum"] = {"Cumeral"}, ["daf"] = {"Dan"}, ["dap"] = {"Nisi (India)"}, ["dgu"] = {"Degaru"}, ["dha"] = {"Dhanwar (India)"}, ["dit"] = {"Dirari"}, ["djl"] = {"Djiwarli"}, ["dkl"] = {"Kolum So Dogon"}, ["drh"] = {"Darkhat"}, ["drr"] = {"Dororo"}, ["drw"] = {"Darwazi"}, ["dud"] = {"Hun-Saare"}, ["duj"] = {"Dhuwal"}, ["dwl"] = {"Walo Kumbe Dogon"}, ["ekc"] = {"Eastern Karnic"}, ["elp"] = {"Elpaputih"}, ["emo"] = {"Emok"}, ["gav"] = {"Gabutamon"}, ["gbc"] = {"Garawa"}, ["gfx"] = {"Mangetti Dune ǃXung"}, ["ggn"] = {"Eastern Gurung"}, ["ggo"] = {"Southern Gondi"}, ["ggr"] = {"Aghu Tharnggalu"}, ["gio"] = {"Gelao"}, ["gji"] = {"Geji"}, ["gli"] = {"Guliguli"}, ["gti"] = {"Gbati-ri"}, ["guv"] = {"Gey"}, ["hrr"] = {"Horuru"}, ["iap"] = {"Iapama"}, ["ibi"] = {"Ibilo"}, ["ill"] = {"Iranun"}, ["ilw"] = {"Talur"}, ["ime"] = {"Imeraguen"}, ["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"}, ["jar"] = {"Jarawa (Nigeria)"}, ["jeg"] = {"Jeng"}, ["kbf"] = {"Kakauhua"}, ["kdv"] = {"Kado"}, ["kgc"] = {"Kasseng"}, ["kgd"] = {"Kataang"}, ["kgh"] = {"Upper Tanudan Kalinga"}, ["kgm"] = {"Karipúna"}, ["kjf"] = {"Khalaj [Indo-Iranian]"}, ["koj"] = {"Sara Dunjo"}, ["kox"] = {"Coxima"}, ["kpp"] = {"Paku Karen"}, ["krm"] = {"Krim"}, ["ksa"] = {"Shuwa-Zamani"}, ["ktr"] = {"Kota Marudu Tinagas"}, ["kvs"] = {"Kunggara"}, ["kwq"] = {"Kwak"}, ["kxe"] = {"Kakihum"}, ["kxl"] = {"Nepali Kurux"}, ["kxu"] = {"Kui (India)"}, ["kzh"] = {"Kenuzi-Dongola"}, ["kzj"] = {"Coastal Kadazan"}, ["kzt"] = {"Tambunan Dusun"}, ["lak"] = {"Laka (Nigeria)"}, ["lba"] = {"Lui"}, ["leg"] = {"Lengua"}, ["lii"] = {"Lingkhim"}, ["llo"] = {"Khlor"}, ["lmm"] = {"Lamam"}, ["lmz"] = {"Lumbee"}, ["lno"] = {"Lango (South Sudan)"}, ["lsg"] = {"Lyons Sign Language"}, ["meg"] = {"Mea"}, ["mgx"] = {"Omati"}, ["mhh"] = {"Maskoy Pidgin"}, ["mja"] = {"Mahei"}, ["mld"] = {"Malakhel"}, ["mnt"] = {"Maykulan"}, ["mof"] = {"Mohegan-Montauk-Narragansett"}, ["mst"] = {"Cataelano Mandaya"}, ["mvm"] = {"Muya"}, ["mwd"] = {"Mudbura"}, ["mwj"] = {"Maligo"}, ["mwx"] = {"Mediak"}, ["mwy"] = {"Mosiro"}, ["myd"] = {"Maramba"}, ["myi"] = {"Mina (India)"}, ["myq"] = {"Forest Maninka"}, ["myt"] = {"Sangab Mandaya"}, ["nad"] = {"Nijadali"}, ["nbf"] = {"Naxi"}, ["nbx"] = {"Ngura"}, ["ncp"] = {"Ndaktup"}, ["ngo"] = {"Ngoni"}, ["nln"] = {"Durango Nahuatl"}, ["nlr"] = {"Ngarla"}, ["nns"] = {"Ningye"}, ["nnx"] = {"Ngong"}, ["nom"] = {"Nocamán"}, ["noo"] = {"Nootka"}, ["nts"] = {"Natagaimas"}, ["nxu"] = {"Narau"}, ["ome"] = {"Omejes"}, ["oun"] = {"ǃOǃung"}, ["pat"] = {"Papitalai"}, ["pbz"] = {"Palu"}, ["pcr"] = {"Panang"}, ["pgy"] = {"Pongyong"}, ["pii"] = {"Pini"}, ["plj"] = {"Polci"}, ["plp"] = {"Palpa"}, ["pmc"] = {"Palumata"}, ["pmk"] = {"Pamlico"}, ["pmu"] = {"Mirpur Panjabi"}, ["pod"] = {"Ponares"}, ["ppa"] = {"Pao"}, ["ppr"] = {"Piru"}, ["prb"] = {"Lua'"}, ["prp"] = {"Parsi"}, ["pry"] = {"Pray 3"}, ["puk"] = {"Pu Ko"}, ["puz"] = {"Purum Naga"}, ["rie"] = {"Rien"}, ["rmr"] = {"Caló"}, ["rna"] = {"Runa"}, ["rsi"] = {"Rennellese Sign Language"}, ["sap"] = {"Sanapaná"}, ["sca"] = {"Sansu"}, ["sdm"] = {"Semandang"}, ["sgl"] = {"Sanglechi-Ishkashimi"}, ["sgo"] = {"Songa"}, ["skk"] = {"Sok"}, ["slq"] = {"Salchuq"}, ["smd"] = {"Sama"}, ["snb"] = {"Sebuyau"}, ["snh"] = {"Shinabo"}, ["sul"] = {"Surigaonon"}, ["sum"] = {"Sumo-Mayangna"}, ["svr"] = {"Savara"}, ["szd"] = {"Seru"}, ["tbb"] = {"Tapeba"}, ["tdu"] = {"Tempasuk Dusun"}, ["tgg"] = {"Tangga"}, ["thc"] = {"Tai Hang Tong"}, ["thw"] = {"Thudam"}, ["thx"] = {"The"}, ["tid"] = {"Tidong"}, ["tie"] = {"Tingal"}, ["tkk"] = {"Takpa"}, ["tlw"] = {"South Wemale"}, ["tmk"] = {"Northwestern Tamang"}, ["tmp"] = {"Tai Mène"}, ["tne"] = {"Tinoc Kallahan"}, ["tnf"] = {"Tangshewi"}, ["toe"] = {"Tomedes"}, ["tpw"] = {"Tupí"}, ["tsf"] = {"Southwestern Tamang"}, ["unp"] = {"Worora"}, ["uok"] = {"Uokha"}, ["uun"] = {"Kulon-Pazeh"}, ["vki"] = {"Ija-Zuba"}, ["wgw"] = {"Wagawaga"}, ["wit"] = {"Wintu"}, ["wiw"] = {"Wirangu"}, ["wra"] = {"Warapu"}, ["wrd"] = {"Warduji"}, ["wya"] = {"Wyandot"}, ["xba"] = {"Kamba (Brazil)"}, ["xbx"] = {"Kabixí"}, ["xia"] = {"Xiandao"}, ["xip"] = {"Xipináwa"}, ["xkh"] = {"Karahawyana"}, ["xrq"] = {"Karranga"}, ["xss"] = {"Assan"}, ["xtz"] = {"Tasmanian"}, ["ybd"] = {"Yangbye"}, ["yds"] = {"Yiddish Sign Language"}, ["yen"] = {"Yendang"}, ["yiy"] = {"Yir Yoront"}, ["yma"] = {"Yamphe"}, ["ymt"] = {"Mator-Taygi-Karagas"}, ["ynh"] = {"Yangho"}, ["yos"] = {"Yos"}, ["yri"] = {"Yarí"}, ["yuu"] = {"Yugh"}, ["zir"] = {"Ziriya"}, ["zkb"] = {"Koibal"}, ["zua"] = {"Zeem"} } return { active = active, deprecated = deprecated, } 7e8fcbc627dace0b48345e47103fa5243cc7add3 Module:Language/data/iana scripts 828 96 265 2023-11-03T15:39:55Z wikipedia>Trappist the monk 0 update to 2023-10-16 data; Scribunto text/plain -- File-Date: 2023-10-16 return { ["Adlm"] = {"Adlam"}, ["Afak"] = {"Afaka"}, ["Aghb"] = {"Caucasian Albanian"}, ["Ahom"] = {"Ahom", "Tai Ahom"}, ["Arab"] = {"Arabic"}, ["Aran"] = {"Arabic (Nastaliq variant)"}, ["Armi"] = {"Imperial Aramaic"}, ["Armn"] = {"Armenian"}, ["Avst"] = {"Avestan"}, ["Bali"] = {"Balinese"}, ["Bamu"] = {"Bamum"}, ["Bass"] = {"Bassa Vah"}, ["Batk"] = {"Batak"}, ["Beng"] = {"Bengali", "Bangla"}, ["Bhks"] = {"Bhaiksuki"}, ["Blis"] = {"Blissymbols"}, ["Bopo"] = {"Bopomofo"}, ["Brah"] = {"Brahmi"}, ["Brai"] = {"Braille"}, ["Bugi"] = {"Buginese"}, ["Buhd"] = {"Buhid"}, ["Cakm"] = {"Chakma"}, ["Cans"] = {"Unified Canadian Aboriginal Syllabics"}, ["Cari"] = {"Carian"}, ["Cham"] = {"Cham"}, ["Cher"] = {"Cherokee"}, ["Chis"] = {"Chisoi"}, ["Chrs"] = {"Chorasmian"}, ["Cirt"] = {"Cirth"}, ["Copt"] = {"Coptic"}, ["Cpmn"] = {"Cypro-Minoan"}, ["Cprt"] = {"Cypriot syllabary"}, ["Cyrl"] = {"Cyrillic"}, ["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"}, ["Deva"] = {"Devanagari", "Nagari"}, ["Diak"] = {"Dives Akuru"}, ["Dogr"] = {"Dogra"}, ["Dsrt"] = {"Deseret", "Mormon"}, ["Dupl"] = {"Duployan shorthand", "Duployan stenography"}, ["Egyd"] = {"Egyptian demotic"}, ["Egyh"] = {"Egyptian hieratic"}, ["Egyp"] = {"Egyptian hieroglyphs"}, ["Elba"] = {"Elbasan"}, ["Elym"] = {"Elymaic"}, ["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"}, ["Gara"] = {"Garay"}, ["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"}, ["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"}, ["Glag"] = {"Glagolitic"}, ["Gong"] = {"Gunjala Gondi"}, ["Gonm"] = {"Masaram Gondi"}, ["Goth"] = {"Gothic"}, ["Gran"] = {"Grantha"}, ["Grek"] = {"Greek"}, ["Gujr"] = {"Gujarati"}, ["Gukh"] = {"Gurung Khema"}, ["Guru"] = {"Gurmukhi"}, ["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"}, ["Hang"] = {"Hangul", "Hangŭl", "Hangeul"}, ["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"}, ["Hano"] = {"Hanunoo", "Hanunóo"}, ["Hans"] = {"Han (Simplified variant)"}, ["Hant"] = {"Han (Traditional variant)"}, ["Hatr"] = {"Hatran"}, ["Hebr"] = {"Hebrew"}, ["Hira"] = {"Hiragana"}, ["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"}, ["Hmng"] = {"Pahawh Hmong"}, ["Hmnp"] = {"Nyiakeng Puachue Hmong"}, ["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"}, ["Hung"] = {"Old Hungarian", "Hungarian Runic"}, ["Inds"] = {"Indus", "Harappan"}, ["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"}, ["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"}, ["Java"] = {"Javanese"}, ["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"}, ["Jurc"] = {"Jurchen"}, ["Kali"] = {"Kayah Li"}, ["Kana"] = {"Katakana"}, ["Kawi"] = {"Kawi"}, ["Khar"] = {"Kharoshthi"}, ["Khmr"] = {"Khmer"}, ["Khoj"] = {"Khojki"}, ["Kitl"] = {"Khitan large script"}, ["Kits"] = {"Khitan small script"}, ["Knda"] = {"Kannada"}, ["Kore"] = {"Korean (alias for Hangul + Han)"}, ["Kpel"] = {"Kpelle"}, ["Krai"] = {"Kirat Rai"}, ["Kthi"] = {"Kaithi"}, ["Lana"] = {"Tai Tham", "Lanna"}, ["Laoo"] = {"Lao"}, ["Latf"] = {"Latin (Fraktur variant)"}, ["Latg"] = {"Latin (Gaelic variant)"}, ["Latn"] = {"Latin"}, ["Leke"] = {"Leke"}, ["Lepc"] = {"Lepcha", "Róng"}, ["Limb"] = {"Limbu"}, ["Lina"] = {"Linear A"}, ["Linb"] = {"Linear B"}, ["Lisu"] = {"Lisu", "Fraser"}, ["Loma"] = {"Loma"}, ["Lyci"] = {"Lycian"}, ["Lydi"] = {"Lydian"}, ["Mahj"] = {"Mahajani"}, ["Maka"] = {"Makasar"}, ["Mand"] = {"Mandaic", "Mandaean"}, ["Mani"] = {"Manichaean"}, ["Marc"] = {"Marchen"}, ["Maya"] = {"Mayan hieroglyphs"}, ["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"}, ["Mend"] = {"Mende Kikakui"}, ["Merc"] = {"Meroitic Cursive"}, ["Mero"] = {"Meroitic Hieroglyphs"}, ["Mlym"] = {"Malayalam"}, ["Modi"] = {"Modi", "Moḍī"}, ["Mong"] = {"Mongolian"}, ["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"}, ["Mroo"] = {"Mro", "Mru"}, ["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"}, ["Mult"] = {"Multani"}, ["Mymr"] = {"Myanmar", "Burmese"}, ["Nagm"] = {"Nag Mundari"}, ["Nand"] = {"Nandinagari"}, ["Narb"] = {"Old North Arabian", "Ancient North Arabian"}, ["Nbat"] = {"Nabataean"}, ["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"}, ["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"}, ["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"}, ["Nkoo"] = {"N’Ko", "N'Ko"}, ["Nshu"] = {"Nüshu"}, ["Ogam"] = {"Ogham"}, ["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"}, ["Onao"] = {"Ol Onal"}, ["Orkh"] = {"Old Turkic", "Orkhon Runic"}, ["Orya"] = {"Oriya", "Odia"}, ["Osge"] = {"Osage"}, ["Osma"] = {"Osmanya"}, ["Ougr"] = {"Old Uyghur"}, ["Palm"] = {"Palmyrene"}, ["Pauc"] = {"Pau Cin Hau"}, ["Pcun"] = {"Proto-Cuneiform"}, ["Pelm"] = {"Proto-Elamite"}, ["Perm"] = {"Old Permic"}, ["Phag"] = {"Phags-pa"}, ["Phli"] = {"Inscriptional Pahlavi"}, ["Phlp"] = {"Psalter Pahlavi"}, ["Phlv"] = {"Book Pahlavi"}, ["Phnx"] = {"Phoenician"}, ["Piqd"] = {"Klingon (KLI pIqaD)"}, ["Plrd"] = {"Miao", "Pollard"}, ["Prti"] = {"Inscriptional Parthian"}, ["Psin"] = {"Proto-Sinaitic"}, ["Ranj"] = {"Ranjana"}, ["Rjng"] = {"Rejang", "Redjang", "Kaganga"}, ["Rohg"] = {"Hanifi Rohingya"}, ["Roro"] = {"Rongorongo"}, ["Runr"] = {"Runic"}, ["Samr"] = {"Samaritan"}, ["Sara"] = {"Sarati"}, ["Sarb"] = {"Old South Arabian"}, ["Saur"] = {"Saurashtra"}, ["Sgnw"] = {"SignWriting"}, ["Shaw"] = {"Shavian", "Shaw"}, ["Shrd"] = {"Sharada", "Śāradā"}, ["Shui"] = {"Shuishu"}, ["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"}, ["Sidt"] = {"Sidetic"}, ["Sind"] = {"Khudawadi", "Sindhi"}, ["Sinh"] = {"Sinhala"}, ["Sogd"] = {"Sogdian"}, ["Sogo"] = {"Old Sogdian"}, ["Sora"] = {"Sora Sompeng"}, ["Soyo"] = {"Soyombo"}, ["Sund"] = {"Sundanese"}, ["Sunu"] = {"Sunuwar"}, ["Sylo"] = {"Syloti Nagri"}, ["Syrc"] = {"Syriac"}, ["Syre"] = {"Syriac (Estrangelo variant)"}, ["Syrj"] = {"Syriac (Western variant)"}, ["Syrn"] = {"Syriac (Eastern variant)"}, ["Tagb"] = {"Tagbanwa"}, ["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"}, ["Tale"] = {"Tai Le"}, ["Talu"] = {"New Tai Lue"}, ["Taml"] = {"Tamil"}, ["Tang"] = {"Tangut"}, ["Tavt"] = {"Tai Viet"}, ["Tayo"] = {"Tai Yo"}, ["Telu"] = {"Telugu"}, ["Teng"] = {"Tengwar"}, ["Tfng"] = {"Tifinagh", "Berber"}, ["Tglg"] = {"Tagalog", "Baybayin", "Alibata"}, ["Thaa"] = {"Thaana"}, ["Thai"] = {"Thai"}, ["Tibt"] = {"Tibetan"}, ["Tirh"] = {"Tirhuta"}, ["Tnsa"] = {"Tangsa"}, ["Todr"] = {"Todhri"}, ["Tols"] = {"Tolong Siki"}, ["Toto"] = {"Toto"}, ["Tutg"] = {"Tulu-Tigalari"}, ["Ugar"] = {"Ugaritic"}, ["Vaii"] = {"Vai"}, ["Visp"] = {"Visible Speech"}, ["Vith"] = {"Vithkuqi"}, ["Wara"] = {"Warang Citi", "Varang Kshiti"}, ["Wcho"] = {"Wancho"}, ["Wole"] = {"Woleai"}, ["Xpeo"] = {"Old Persian"}, ["Xsux"] = {"Sumero-Akkadian cuneiform"}, ["Yezi"] = {"Yezidi"}, ["Yiii"] = {"Yi"}, ["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"}, ["Zinh"] = {"Code for inherited script"}, ["Zmth"] = {"Mathematical notation"}, ["Zsye"] = {"Symbols (Emoji variant)"}, ["Zsym"] = {"Symbols"}, ["Zxxx"] = {"Code for unwritten documents"}, ["Zyyy"] = {"Code for undetermined script"}, ["Zzzz"] = {"Code for uncoded script"} } 90e7ff616b305955e94fca8cce479cc69e5277c4 Module:Language/data/iana regions 828 97 267 2023-11-03T15:39:57Z wikipedia>Trappist the monk 0 update to 2023-10-16 data; Scribunto text/plain -- File-Date: 2023-10-16 return { ["AC"] = {"Ascension Island"}, ["AD"] = {"Andorra"}, ["AE"] = {"United Arab Emirates"}, ["AF"] = {"Afghanistan"}, ["AG"] = {"Antigua and Barbuda"}, ["AI"] = {"Anguilla"}, ["AL"] = {"Albania"}, ["AM"] = {"Armenia"}, ["AO"] = {"Angola"}, ["AQ"] = {"Antarctica"}, ["AR"] = {"Argentina"}, ["AS"] = {"American Samoa"}, ["AT"] = {"Austria"}, ["AU"] = {"Australia"}, ["AW"] = {"Aruba"}, ["AX"] = {"Åland Islands"}, ["AZ"] = {"Azerbaijan"}, ["BA"] = {"Bosnia and Herzegovina"}, ["BB"] = {"Barbados"}, ["BD"] = {"Bangladesh"}, ["BE"] = {"Belgium"}, ["BF"] = {"Burkina Faso"}, ["BG"] = {"Bulgaria"}, ["BH"] = {"Bahrain"}, ["BI"] = {"Burundi"}, ["BJ"] = {"Benin"}, ["BL"] = {"Saint Barthélemy"}, ["BM"] = {"Bermuda"}, ["BN"] = {"Brunei Darussalam"}, ["BO"] = {"Bolivia"}, ["BQ"] = {"Bonaire, Sint Eustatius and Saba"}, ["BR"] = {"Brazil"}, ["BS"] = {"Bahamas"}, ["BT"] = {"Bhutan"}, ["BV"] = {"Bouvet Island"}, ["BW"] = {"Botswana"}, ["BY"] = {"Belarus"}, ["BZ"] = {"Belize"}, ["CA"] = {"Canada"}, ["CC"] = {"Cocos (Keeling) Islands"}, ["CD"] = {"The Democratic Republic of the Congo"}, ["CF"] = {"Central African Republic"}, ["CG"] = {"Congo"}, ["CH"] = {"Switzerland"}, ["CI"] = {"Côte d'Ivoire"}, ["CK"] = {"Cook Islands"}, ["CL"] = {"Chile"}, ["CM"] = {"Cameroon"}, ["CN"] = {"China"}, ["CO"] = {"Colombia"}, ["CP"] = {"Clipperton Island"}, ["CQ"] = {"Sark"}, ["CR"] = {"Costa Rica"}, ["CU"] = {"Cuba"}, ["CV"] = {"Cabo Verde", "Cape Verde"}, ["CW"] = {"Curaçao"}, ["CX"] = {"Christmas Island"}, ["CY"] = {"Cyprus"}, ["CZ"] = {"Czechia", "Czech Republic"}, ["DE"] = {"Germany"}, ["DG"] = {"Diego Garcia"}, ["DJ"] = {"Djibouti"}, ["DK"] = {"Denmark"}, ["DM"] = {"Dominica"}, ["DO"] = {"Dominican Republic"}, ["DZ"] = {"Algeria"}, ["EA"] = {"Ceuta, Melilla"}, ["EC"] = {"Ecuador"}, ["EE"] = {"Estonia"}, ["EG"] = {"Egypt"}, ["EH"] = {"Western Sahara"}, ["ER"] = {"Eritrea"}, ["ES"] = {"Spain"}, ["ET"] = {"Ethiopia"}, ["EU"] = {"European Union"}, ["EZ"] = {"Eurozone"}, ["FI"] = {"Finland"}, ["FJ"] = {"Fiji"}, ["FK"] = {"Falkland Islands (Malvinas)"}, ["FM"] = {"Federated States of Micronesia"}, ["FO"] = {"Faroe Islands"}, ["FR"] = {"France"}, ["GA"] = {"Gabon"}, ["GB"] = {"United Kingdom"}, ["GD"] = {"Grenada"}, ["GE"] = {"Georgia"}, ["GF"] = {"French Guiana"}, ["GG"] = {"Guernsey"}, ["GH"] = {"Ghana"}, ["GI"] = {"Gibraltar"}, ["GL"] = {"Greenland"}, ["GM"] = {"Gambia"}, ["GN"] = {"Guinea"}, ["GP"] = {"Guadeloupe"}, ["GQ"] = {"Equatorial Guinea"}, ["GR"] = {"Greece"}, ["GS"] = {"South Georgia and the South Sandwich Islands"}, ["GT"] = {"Guatemala"}, ["GU"] = {"Guam"}, ["GW"] = {"Guinea-Bissau"}, ["GY"] = {"Guyana"}, ["HK"] = {"Hong Kong"}, ["HM"] = {"Heard Island and McDonald Islands"}, ["HN"] = {"Honduras"}, ["HR"] = {"Croatia"}, ["HT"] = {"Haiti"}, ["HU"] = {"Hungary"}, ["IC"] = {"Canary Islands"}, ["ID"] = {"Indonesia"}, ["IE"] = {"Ireland"}, ["IL"] = {"Israel"}, ["IM"] = {"Isle of Man"}, ["IN"] = {"India"}, ["IO"] = {"British Indian Ocean Territory"}, ["IQ"] = {"Iraq"}, ["IR"] = {"Islamic Republic of Iran"}, ["IS"] = {"Iceland"}, ["IT"] = {"Italy"}, ["JE"] = {"Jersey"}, ["JM"] = {"Jamaica"}, ["JO"] = {"Jordan"}, ["JP"] = {"Japan"}, ["KE"] = {"Kenya"}, ["KG"] = {"Kyrgyzstan"}, ["KH"] = {"Cambodia"}, ["KI"] = {"Kiribati"}, ["KM"] = {"Comoros"}, ["KN"] = {"Saint Kitts and Nevis"}, ["KP"] = {"Democratic People's Republic of Korea"}, ["KR"] = {"Republic of Korea"}, ["KW"] = {"Kuwait"}, ["KY"] = {"Cayman Islands"}, ["KZ"] = {"Kazakhstan"}, ["LA"] = {"Lao People's Democratic Republic"}, ["LB"] = {"Lebanon"}, ["LC"] = {"Saint Lucia"}, ["LI"] = {"Liechtenstein"}, ["LK"] = {"Sri Lanka"}, ["LR"] = {"Liberia"}, ["LS"] = {"Lesotho"}, ["LT"] = {"Lithuania"}, ["LU"] = {"Luxembourg"}, ["LV"] = {"Latvia"}, ["LY"] = {"Libya"}, ["MA"] = {"Morocco"}, ["MC"] = {"Monaco"}, ["MD"] = {"Moldova"}, ["ME"] = {"Montenegro"}, ["MF"] = {"Saint Martin (French part)"}, ["MG"] = {"Madagascar"}, ["MH"] = {"Marshall Islands"}, ["MK"] = {"North Macedonia"}, ["ML"] = {"Mali"}, ["MM"] = {"Myanmar"}, ["MN"] = {"Mongolia"}, ["MO"] = {"Macao"}, ["MP"] = {"Northern Mariana Islands"}, ["MQ"] = {"Martinique"}, ["MR"] = {"Mauritania"}, ["MS"] = {"Montserrat"}, ["MT"] = {"Malta"}, ["MU"] = {"Mauritius"}, ["MV"] = {"Maldives"}, ["MW"] = {"Malawi"}, ["MX"] = {"Mexico"}, ["MY"] = {"Malaysia"}, ["MZ"] = {"Mozambique"}, ["NA"] = {"Namibia"}, ["NC"] = {"New Caledonia"}, ["NE"] = {"Niger"}, ["NF"] = {"Norfolk Island"}, ["NG"] = {"Nigeria"}, ["NI"] = {"Nicaragua"}, ["NL"] = {"Netherlands"}, ["NO"] = {"Norway"}, ["NP"] = {"Nepal"}, ["NR"] = {"Nauru"}, ["NU"] = {"Niue"}, ["NZ"] = {"New Zealand"}, ["OM"] = {"Oman"}, ["PA"] = {"Panama"}, ["PE"] = {"Peru"}, ["PF"] = {"French Polynesia"}, ["PG"] = {"Papua New Guinea"}, ["PH"] = {"Philippines"}, ["PK"] = {"Pakistan"}, ["PL"] = {"Poland"}, ["PM"] = {"Saint Pierre and Miquelon"}, ["PN"] = {"Pitcairn"}, ["PR"] = {"Puerto Rico"}, ["PS"] = {"State of Palestine"}, ["PT"] = {"Portugal"}, ["PW"] = {"Palau"}, ["PY"] = {"Paraguay"}, ["QA"] = {"Qatar"}, ["RE"] = {"Réunion"}, ["RO"] = {"Romania"}, ["RS"] = {"Serbia"}, ["RU"] = {"Russian Federation"}, ["RW"] = {"Rwanda"}, ["SA"] = {"Saudi Arabia"}, ["SB"] = {"Solomon Islands"}, ["SC"] = {"Seychelles"}, ["SD"] = {"Sudan"}, ["SE"] = {"Sweden"}, ["SG"] = {"Singapore"}, ["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {"Slovenia"}, ["SJ"] = {"Svalbard and Jan Mayen"}, ["SK"] = {"Slovakia"}, ["SL"] = {"Sierra Leone"}, ["SM"] = {"San Marino"}, ["SN"] = {"Senegal"}, ["SO"] = {"Somalia"}, ["SR"] = {"Suriname"}, ["SS"] = {"South Sudan"}, ["ST"] = {"Sao Tome and Principe"}, ["SV"] = {"El Salvador"}, ["SX"] = {"Sint Maarten (Dutch part)"}, ["SY"] = {"Syrian Arab Republic"}, ["SZ"] = {"Eswatini", "eSwatini", "Swaziland"}, ["TA"] = {"Tristan da Cunha"}, ["TC"] = {"Turks and Caicos Islands"}, ["TD"] = {"Chad"}, ["TF"] = {"French Southern Territories"}, ["TG"] = {"Togo"}, ["TH"] = {"Thailand"}, ["TJ"] = {"Tajikistan"}, ["TK"] = {"Tokelau"}, ["TL"] = {"Timor-Leste"}, ["TM"] = {"Turkmenistan"}, ["TN"] = {"Tunisia"}, ["TO"] = {"Tonga"}, ["TR"] = {"Türkiye", "Turkey"}, ["TT"] = {"Trinidad and Tobago"}, ["TV"] = {"Tuvalu"}, ["TW"] = {"Taiwan, Province of China"}, ["TZ"] = {"United Republic of Tanzania"}, ["UA"] = {"Ukraine"}, ["UG"] = {"Uganda"}, ["UM"] = {"United States Minor Outlying Islands"}, ["UN"] = {"United Nations"}, ["US"] = {"United States"}, ["UY"] = {"Uruguay"}, ["UZ"] = {"Uzbekistan"}, ["VA"] = {"Holy See (Vatican City State)"}, ["VC"] = {"Saint Vincent and the Grenadines"}, ["VE"] = {"Venezuela"}, ["VG"] = {"British Virgin Islands"}, ["VI"] = {"U.S. Virgin Islands"}, ["VN"] = {"Viet Nam"}, ["VU"] = {"Vanuatu"}, ["WF"] = {"Wallis and Futuna"}, ["WS"] = {"Samoa"}, ["YE"] = {"Yemen"}, ["YT"] = {"Mayotte"}, ["ZA"] = {"South Africa"}, ["ZM"] = {"Zambia"}, ["ZW"] = {"Zimbabwe"}, ["001"] = {"World"}, ["002"] = {"Africa"}, ["003"] = {"North America"}, ["005"] = {"South America"}, ["009"] = {"Oceania"}, ["011"] = {"Western Africa"}, ["013"] = {"Central America"}, ["014"] = {"Eastern Africa"}, ["015"] = {"Northern Africa"}, ["017"] = {"Middle Africa"}, ["018"] = {"Southern Africa"}, ["019"] = {"Americas"}, ["021"] = {"Northern America"}, ["029"] = {"Caribbean"}, ["030"] = {"Eastern Asia"}, ["034"] = {"Southern Asia"}, ["035"] = {"South-Eastern Asia"}, ["039"] = {"Southern Europe"}, ["053"] = {"Australia and New Zealand"}, ["054"] = {"Melanesia"}, ["057"] = {"Micronesia"}, ["061"] = {"Polynesia"}, ["142"] = {"Asia"}, ["143"] = {"Central Asia"}, ["145"] = {"Western Asia"}, ["150"] = {"Europe"}, ["151"] = {"Eastern Europe"}, ["154"] = {"Northern Europe"}, ["155"] = {"Western Europe"}, ["202"] = {"Sub-Saharan Africa"}, ["419"] = {"Latin America and the Caribbean"} } 38ed555cd3945668fad81deefcc2ce6558bff172 Module:Language/data/iana variants 828 98 269 2023-11-03T15:39:59Z wikipedia>Trappist the monk 0 update to 2023-10-16 data; Scribunto text/plain -- File-Date: 2023-10-16 return { ["1606nict"] = { ["descriptions"] = {"Late Middle French (to 1606)"}, ["prefixes"] = {"frm"}, }, ["1694acad"] = { ["descriptions"] = {"Early Modern French"}, ["prefixes"] = {"fr"}, }, ["1901"] = { ["descriptions"] = {"Traditional German orthography"}, ["prefixes"] = {"de"}, }, ["1959acad"] = { ["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"}, ["prefixes"] = {"be"}, }, ["1994"] = { ["descriptions"] = {"Standardized Resian orthography"}, ["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, }, ["1996"] = { ["descriptions"] = {"German orthography of 1996"}, ["prefixes"] = {"de"}, }, ["abl1943"] = { ["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"}, ["prefixes"] = {"pt-br"}, }, ["akuapem"] = { ["descriptions"] = {"Akuapem Twi"}, ["prefixes"] = {"tw"}, }, ["alalc97"] = { ["descriptions"] = {"ALA-LC Romanization, 1997 edition"}, ["prefixes"] = {}, }, ["aluku"] = { ["descriptions"] = {"Aluku dialect", "Boni dialect"}, ["prefixes"] = {"djk"}, }, ["ao1990"] = { ["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"}, ["prefixes"] = {"pt", "gl"}, }, ["aranes"] = { ["descriptions"] = {"Aranese"}, ["prefixes"] = {"oc"}, }, ["arkaika"] = { ["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"}, ["prefixes"] = {"eo"}, }, ["asante"] = { ["descriptions"] = {"Asante Twi", "Ashanti Twi"}, ["prefixes"] = {"tw"}, }, ["auvern"] = { ["descriptions"] = {"Auvergnat"}, ["prefixes"] = {"oc"}, }, ["baku1926"] = { ["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"}, ["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, }, ["balanka"] = { ["descriptions"] = {"The Balanka dialect of Anii"}, ["prefixes"] = {"blo"}, }, ["barla"] = { ["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["basiceng"] = { ["descriptions"] = {"Basic English"}, ["prefixes"] = {"en"}, }, ["bauddha"] = { ["descriptions"] = {"Buddhist Hybrid Sanskrit"}, ["prefixes"] = {"sa"}, }, ["bciav"] = { ["descriptions"] = {"BCI Blissymbolics AV"}, ["prefixes"] = {"zbl"}, }, ["bcizbl"] = { ["descriptions"] = {"BCI Blissymbolics"}, ["prefixes"] = {"zbl"}, }, ["biscayan"] = { ["descriptions"] = {"Biscayan dialect of Basque"}, ["prefixes"] = {"eu"}, }, ["biske"] = { ["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["blasl"] = { ["descriptions"] = {"Black American Sign Language dialect"}, ["prefixes"] = {"ase", "sgn-ase"}, }, ["bohoric"] = { ["descriptions"] = {"Slovene in Bohorič alphabet"}, ["prefixes"] = {"sl"}, }, ["boont"] = { ["descriptions"] = {"Boontling"}, ["prefixes"] = {"en"}, }, ["bornholm"] = { ["descriptions"] = {"Bornholmsk"}, ["prefixes"] = {"da"}, }, ["cisaup"] = { ["descriptions"] = {"Cisalpine"}, ["prefixes"] = {"oc"}, }, ["colb1945"] = { ["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"}, ["prefixes"] = {"pt"}, }, ["cornu"] = { ["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"}, ["prefixes"] = {"en"}, }, ["creiss"] = { ["descriptions"] = {"Occitan variants of the Croissant area"}, ["prefixes"] = {"oc"}, }, ["dajnko"] = { ["descriptions"] = {"Slovene in Dajnko alphabet"}, ["prefixes"] = {"sl"}, }, ["ekavsk"] = { ["descriptions"] = {"Serbian with Ekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["emodeng"] = { ["descriptions"] = {"Early Modern English (1500-1700)"}, ["prefixes"] = {"en"}, }, ["fonipa"] = { ["descriptions"] = {"International Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonkirsh"] = { ["descriptions"] = {"Kirshenbaum Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonnapa"] = { ["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"}, ["prefixes"] = {}, }, ["fonupa"] = { ["descriptions"] = {"Uralic Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonxsamp"] = { ["descriptions"] = {"X-SAMPA transcription"}, ["prefixes"] = {}, }, ["gallo"] = { ["descriptions"] = {"Gallo"}, ["prefixes"] = {"fr"}, }, ["gascon"] = { ["descriptions"] = {"Gascon"}, ["prefixes"] = {"oc"}, }, ["grclass"] = { ["descriptions"] = {"Classical Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["grital"] = { ["descriptions"] = {"Italian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, }, ["grmistr"] = { ["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["hepburn"] = { ["descriptions"] = {"Hepburn romanization"}, ["prefixes"] = {"ja-latn"}, }, ["hognorsk"] = { ["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"}, ["prefixes"] = {"nn"}, }, ["hsistemo"] = { ["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, }, ["ijekavsk"] = { ["descriptions"] = {"Serbian with Ijekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["itihasa"] = { ["descriptions"] = {"Epic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["ivanchov"] = { ["descriptions"] = {"Bulgarian in 1899 orthography"}, ["prefixes"] = {"bg"}, }, ["jauer"] = { ["descriptions"] = {"Jauer dialect of Romansh"}, ["prefixes"] = {"rm"}, }, ["jyutping"] = { ["descriptions"] = {"Jyutping Cantonese Romanization"}, ["prefixes"] = {"yue"}, }, ["kkcor"] = { ["descriptions"] = {"Common Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["kociewie"] = { ["descriptions"] = {"The Kociewie dialect of Polish"}, ["prefixes"] = {"pl"}, }, ["kscor"] = { ["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"}, ["prefixes"] = {"kw"}, }, ["laukika"] = { ["descriptions"] = {"Classical Sanskrit"}, ["prefixes"] = {"sa"}, }, ["lemosin"] = { ["descriptions"] = {"Limousin"}, ["prefixes"] = {"oc"}, }, ["lengadoc"] = { ["descriptions"] = {"Languedocien"}, ["prefixes"] = {"oc"}, }, ["lipaw"] = { ["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["ltg1929"] = { ["descriptions"] = {"The Latgalian language orthography codified in 1929"}, ["prefixes"] = {"ltg"}, }, ["ltg2007"] = { ["descriptions"] = {"The Latgalian language orthography codified in the language law in 2007"}, ["prefixes"] = {"ltg"}, }, ["luna1918"] = { ["descriptions"] = {"Post-1917 Russian orthography"}, ["prefixes"] = {"ru"}, }, ["metelko"] = { ["descriptions"] = {"Slovene in Metelko alphabet"}, ["prefixes"] = {"sl"}, }, ["monoton"] = { ["descriptions"] = {"Monotonic Greek"}, ["prefixes"] = {"el"}, }, ["ndyuka"] = { ["descriptions"] = {"Ndyuka dialect", "Aukan dialect"}, ["prefixes"] = {"djk"}, }, ["nedis"] = { ["descriptions"] = {"Natisone dialect", "Nadiza dialect"}, ["prefixes"] = {"sl"}, }, ["newfound"] = { ["descriptions"] = {"Newfoundland English"}, ["prefixes"] = {"en-ca"}, }, ["nicard"] = { ["descriptions"] = {"Niçard"}, ["prefixes"] = {"oc"}, }, ["njiva"] = { ["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["nulik"] = { ["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"}, ["prefixes"] = {"vo"}, }, ["osojs"] = { ["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["oxendict"] = { ["descriptions"] = {"Oxford English Dictionary spelling"}, ["prefixes"] = {"en"}, }, ["pahawh2"] = { ["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh3"] = { ["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh4"] = { ["descriptions"] = {"Pahawh Hmong Final Version orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pamaka"] = { ["descriptions"] = {"Pamaka dialect"}, ["prefixes"] = {"djk"}, }, ["peano"] = { ["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"}, ["prefixes"] = {"la"}, }, ["petr1708"] = { ["descriptions"] = {"Petrine orthography"}, ["prefixes"] = {"ru"}, }, ["pinyin"] = { ["descriptions"] = {"Pinyin romanization"}, ["prefixes"] = {"zh-latn", "bo-latn"}, }, ["polyton"] = { ["descriptions"] = {"Polytonic Greek"}, ["prefixes"] = {"el"}, }, ["provenc"] = { ["descriptions"] = {"Provençal"}, ["prefixes"] = {"oc"}, }, ["puter"] = { ["descriptions"] = {"Puter idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["rigik"] = { ["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"}, ["prefixes"] = {"vo"}, }, ["rozaj"] = { ["descriptions"] = {"Resian", "Resianic", "Rezijan"}, ["prefixes"] = {"sl"}, }, ["rumgr"] = { ["descriptions"] = {"Rumantsch Grischun"}, ["prefixes"] = {"rm"}, }, ["scotland"] = { ["descriptions"] = {"Scottish Standard English"}, ["prefixes"] = {"en"}, }, ["scouse"] = { ["descriptions"] = {"Scouse"}, ["prefixes"] = {"en"}, }, ["simple"] = { ["descriptions"] = {"Simplified form"}, ["prefixes"] = {}, }, ["solba"] = { ["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["sotav"] = { ["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["spanglis"] = { ["descriptions"] = {"Spanglish"}, ["prefixes"] = {"en", "es"}, }, ["surmiran"] = { ["descriptions"] = {"Surmiran idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sursilv"] = { ["descriptions"] = {"Sursilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sutsilv"] = { ["descriptions"] = {"Sutsilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["synnejyl"] = { ["descriptions"] = {"Synnejysk", "South Jutish"}, ["prefixes"] = {"da"}, }, ["tarask"] = { ["descriptions"] = {"Belarusian in Taraskievica orthography"}, ["prefixes"] = {"be"}, }, ["tongyong"] = { ["descriptions"] = {"Tongyong Pinyin romanization"}, ["prefixes"] = {"zh-latn"}, }, ["tunumiit"] = { ["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"}, ["prefixes"] = {"kl"}, }, ["uccor"] = { ["descriptions"] = {"Unified Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ucrcor"] = { ["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ulster"] = { ["descriptions"] = {"Ulster dialect of Scots"}, ["prefixes"] = {"sco"}, }, ["unifon"] = { ["descriptions"] = {"Unifon phonetic alphabet"}, ["prefixes"] = {"en", "hup", "kyh", "tol", "yur"}, }, ["vaidika"] = { ["descriptions"] = {"Vedic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["valencia"] = { ["descriptions"] = {"Valencian"}, ["prefixes"] = {"ca"}, }, ["vallader"] = { ["descriptions"] = {"Vallader idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["vecdruka"] = { ["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"}, ["prefixes"] = {"lv"}, }, ["vivaraup"] = { ["descriptions"] = {"Vivaro-Alpine"}, ["prefixes"] = {"oc"}, }, ["wadegile"] = { ["descriptions"] = {"Wade-Giles romanization"}, ["prefixes"] = {"zh-latn"}, }, ["xsistemo"] = { ["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, } } fe5d6330175026010e0d8d9aef185dbd571c3d57 Module:Language/data/iana suppressed scripts 828 99 271 2023-11-03T15:40:00Z wikipedia>Trappist the monk 0 update to 2023-10-16 data; Scribunto text/plain -- File-Date: 2023-10-16 return { ["Arab"] = {"ar", "fa", "ps", "ur"}, ["Armn"] = {"hy"}, ["Beng"] = {"as", "bn"}, ["Blis"] = {"zbl"}, ["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"}, ["Deva"] = {"hi", "mr", "ne", "kok", "mai"}, ["Ethi"] = {"am", "ti"}, ["Geor"] = {"ka"}, ["Grek"] = {"el"}, ["Gujr"] = {"gu"}, ["Guru"] = {"pa"}, ["Hebr"] = {"he", "iw", "yi"}, ["Jpan"] = {"ja"}, ["Khmr"] = {"km"}, ["Knda"] = {"kn"}, ["Kore"] = {"ko"}, ["Laoo"] = {"lo"}, ["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo", "es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn", "gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb", "ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd", "nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn", "ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv", "sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb", "frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh", "tpi", "tvl"}, ["Mlym"] = {"ml"}, ["Mymr"] = {"my"}, ["Nkoo"] = {"nqo"}, ["Orya"] = {"or"}, ["Sinh"] = {"si"}, ["Taml"] = {"ta"}, ["Telu"] = {"te"}, ["Thaa"] = {"dv"}, ["Thai"] = {"th"}, ["Tibt"] = {"dz"} } 1708132b06b72c9ca4217aaa0ddc8a1e8b234646 Template:Div col/styles.css 10 45 87 2023-11-07T21:54:12Z wikipedia>Izno 0 revert per talk page text text/plain /* {{pp|small=yes}} */ .div-col { margin-top: 0.3em; column-width: 30em; } .div-col-small { font-size: 90%; } .div-col-rules { column-rule: 1px solid #aaa; } /* Reset top margin for lists in div col */ .div-col dl, .div-col ol, .div-col ul { margin-top: 0; } /* Avoid elements breaking between columns See also Template:No col break */ .div-col li, .div-col dd { page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */ break-inside: avoid-column; } c6c2dc0cb2bab7a5f7b4eb938eebc5c67df087bc Module:Hatnote list 828 35 67 2023-11-13T21:00:31Z wikipedia>Nihiltres 0 Updated from sandbox: added support for punctuation collapse when text is italicized. The update's content includes changes by users Johnuniq, Dexxor, and Nihiltres. Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation at end of string, ignoring italics and links local function punctuationCollapse (text) return text:match("[.?!]('?)%1(%]?)%2%.$") and text:sub(1, -2) or text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p 1c8e6212115f76ecc3db8d05137011cd18207988 Module:Unicode data 828 93 259 2023-11-22T21:35:20Z wikipedia>Pppery 0 Per edit request Scribunto text/plain local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1) else -- level is actually the format string. return error(string.format(level, ...), 2) end end local function binary_range_search(codepoint, ranges) local low, mid, high low, high = 1, ranges.length or require "Module:TableTools".length(ranges) while low <= high do mid = floor((low + high) / 2) local range = ranges[mid] if codepoint < range[1] then high = mid - 1 elseif codepoint <= range[2] then return range, mid else low = mid + 1 end end return nil, mid end p.binary_range_search = binary_range_search --[[ local function linear_range_search(codepoint, ranges) for i, range in ipairs(ranges) do if range[1] <= codepoint and codepoint <= range[2] then return range end end end --]] -- Load a module by indexing "loader" with the name of the module minus the -- "Module:Unicode data/" part. For instance, loader.blocks returns -- [[Module:Unicode data/blocks]]. If a module cannot be loaded, false will be -- returned. local loader = setmetatable({}, { __index = function (self, key) local success, data = pcall(mw.loadData, "Module:Unicode data/" .. key) if not success then data = false end self[key] = data return data end }) -- For the algorithm used to generate Hangul Syllable names, -- see "Hangul Syllable Name Generation" in section 3.12 of the -- Unicode Specification: -- https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf local name_hooks = { { 0x00, 0x1F, "<control-%04X>" }, -- C0 control characters { 0x7F, 0x9F, "<control-%04X>" }, -- DEL and C1 control characters { 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A { 0x4E00, 0x9FFF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph { 0xAC00, 0xD7A3, function (codepoint) -- Hangul Syllables local Hangul_data = loader.Hangul local syllable_index = codepoint - 0xAC00 return ("HANGUL SYLLABLE %s%s%s"):format( Hangul_data.leads[floor(syllable_index / Hangul_data.final_count)], Hangul_data.vowels[floor((syllable_index % Hangul_data.final_count) / Hangul_data.trail_count)], Hangul_data.trails[syllable_index % Hangul_data.trail_count] ) end }, -- High Surrogates, High Private Use Surrogates, Low Surrogates { 0xD800, 0xDFFF, "<surrogate-%04X>" }, { 0xE000, 0xF8FF, "<private-use-%04X>" }, -- Private Use -- CJK Compatibility Ideographs { 0xF900, 0xFA6D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xFA70, 0xFAD9, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0x17000, 0x187F7, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph { 0x18800, 0x18AFF, function (codepoint) return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF) end }, { 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph Supplement { 0x1B170, 0x1B2FB, "NUSHU CHARACTER-%04X" }, -- Nushu { 0x20000, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B { 0x2A700, 0x2B739, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension C { 0x2B740, 0x2B81D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension D { 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E { 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F -- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane) { 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17) end}, { 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G { 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H { 0x2EBF0, 0x2EE5D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension I { 0xF0000, 0xFFFFD, "<private-use-%04X>" }, -- Plane 15 Private Use { 0x100000, 0x10FFFD, "<private-use-%04X>" } -- Plane 16 Private Use } name_hooks.length = #name_hooks local name_range_cache local function generate_name(data, codepoint) if type(data) == "string" then return data:format(codepoint) else return data(codepoint) end end --[[ -- Checks that the code point is a number and in range. -- Does not check whether code point is an integer. -- Not used local function check_codepoint(funcName, argIdx, val) require 'libraryUtil'.checkType(funcName, argIdx, val, 'number') if codepoint < 0 or 0x10FFFF < codepoint then errorf("Codepoint %04X out of range", codepoint) end end --]] -- https://www.unicode.org/versions/Unicode11.0.0/ch04.pdf, section 4.8 function p.lookup_name(codepoint) -- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned -- (Cn) and specifically noncharacters: -- https://www.unicode.org/faq/private_use.html#nonchar4 if 0xFDD0 <= codepoint and (codepoint <= 0xFDEF or floor(codepoint % 0x10000) >= 0xFFFE) then return ("<noncharacter-%04X>"):format(codepoint) end if name_range_cache -- Check if previously used "name hook" applies to this code point. and codepoint >= name_range_cache[1] and codepoint <= name_range_cache[2] then return generate_name(name_range_cache[3], codepoint) end local range = binary_range_search(codepoint, name_hooks) if range then name_range_cache = range return generate_name(range[3], codepoint) end local data = loader[('names/%03X'):format(codepoint / 0x1000)] if data and data[codepoint] then return data[codepoint] -- Unassigned (Cn) consists of noncharacters and reserved characters. -- The character has been established not to be a noncharacter, -- and if it were assigned, its name would already been retrieved, -- so it must be reserved. else return ("<reserved-%04X>"):format(codepoint) end end function p.lookup_image(codepoint) local data = loader[('images/%03X'):format(codepoint / 0x1000)] if data then return data[codepoint] end end local planes = { [ 0] = "Basic Multilingual Plane"; [ 1] = "Supplementary Multilingual Plane"; [ 2] = "Supplementary Ideographic Plane"; [ 3] = "Tertiary Ideographic Plane"; [14] = "Supplementary Special-purpose Plane"; [15] = "Supplementary Private Use Area-A"; [16] = "Supplementary Private Use Area-B"; } -- Load [[Module:Unicode data/blocks]] if needed and assign it to this variable. local blocks local function block_iter(blocks, i) i = i + 1 local data = blocks[i] if data then -- Unpack doesn't work on tables loaded with mw.loadData. return i, data[1], data[2], data[3] end end -- An ipairs-type iterator generator for the list of blocks. function p.enum_blocks() local blocks = loader.blocks return block_iter, blocks, 0 end function p.lookup_plane(codepoint) local i = floor(codepoint / 0x10000) return planes[i] or ("Plane %u"):format(i) end function p.lookup_block(codepoint) local blocks = loader.blocks local range = binary_range_search(codepoint, blocks) if range then return range[3] else return "No Block" end end function p.get_block_info(name) for i, block in ipairs(loader.blocks) do if block[3] == name then return block end end end function p.is_valid_pagename(pagename) local has_nonws = false for cp in mw.ustring.gcodepoint(pagename) do if (cp == 0x0023) -- # or (cp == 0x005B) -- [ or (cp == 0x005D) -- ] or (cp == 0x007B) -- { or (cp == 0x007C) -- | or (cp == 0x007D) -- } or (cp == 0x180E) -- MONGOLIAN VOWEL SEPARATOR or ((cp >= 0x2000) and (cp <= 0x200A)) -- spaces in General Punctuation block or (cp == 0xFFFD) -- REPLACEMENT CHARACTER then return false end local printable, result = p.is_printable(cp) if not printable then return false end if result ~= "space-separator" then has_nonws = true end end return has_nonws end local function manual_unpack(what, from) if what[from + 1] == nil then return what[from] end local result = {} from = from or 1 for i, item in ipairs(what) do if i >= from then table.insert(result, item) end end return unpack(result) end local function compare_ranges(range1, range2) return range1[1] < range2[1] end -- Creates a function to look up data in a module that contains "singles" (a -- code point-to-data map) and "ranges" (an array containing arrays that contain -- the low and high code points of a range and the data associated with that -- range). -- "loader" loads and returns the "singles" and "ranges" tables. -- "match_func" is passed the code point and either the data or the "dots", and -- generates the final result of the function. -- The varargs ("dots") describes the default data to be returned if there wasn't -- a match. -- In case the function is used more than once, "cache" saves ranges that have -- already been found to match, or a range whose data is the default if there -- was no match. local function memo_lookup(data_module_subpage, match_func, ...) local dots = { ... } local cache = {} local singles, ranges return function (codepoint) if not singles then local data_module = loader[data_module_subpage] singles, ranges = data_module.singles, data_module.ranges end if singles[codepoint] then return match_func(codepoint, singles[codepoint]) end local range = binary_range_search(codepoint, cache) if range then return match_func(codepoint, manual_unpack(range, 3)) end local range, index = binary_range_search(codepoint, ranges) if range then table.insert(cache, range) table.sort(cache, compare_ranges) return match_func(codepoint, manual_unpack(range, 3)) end if ranges[index] then local dots_range if codepoint > ranges[index][2] then dots_range = { ranges[index][2] + 1, ranges[index + 1] and ranges[index + 1][1] - 1 or 0x10FFFF, unpack(dots) } else -- codepoint < range[index][1] dots_range = { ranges[index - 1] and ranges[index - 1][2] + 1 or 0, ranges[index][1] - 1, unpack(dots) } end table.sort(cache, compare_ranges) end return match_func(codepoint) end end -- Get a code point's combining class value in [[Module:Unicode data/combining]], -- and return whether this value is not zero. Zero is assigned as the default -- if the combining class value is not found in this data module. -- That is, return true if character is combining, or false if it is not. -- See https://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values for -- more information. p.is_combining = memo_lookup( "combining", function (codepoint, combining_class) return combining_class and combining_class ~= 0 or false end, 0) function p.add_dotted_circle(str) return (mw.ustring.gsub(str, ".", function(char) if p.is_combining(mw.ustring.codepoint(char)) then return '◌' .. char end end)) end local lookup_control = memo_lookup( "control", function (codepoint, ccc) return ccc or "assigned" end, "assigned") p.lookup_control = lookup_control function p.is_assigned(codepoint) return lookup_control(codepoint) ~= "unassigned" end function p.is_printable(codepoint) local result = lookup_control(codepoint) return (result == "assigned") or (result == "space-separator"), result end function p.is_whitespace(codepoint) local result = lookup_control(codepoint) return (result == "space-separator"), result end p.lookup_category = memo_lookup( "category", function (codepoint, category) return category end, "Cn") local lookup_script = memo_lookup( "scripts", function (codepoint, script_code) return script_code or 'Zzzz' end, "Zzzz") p.lookup_script = lookup_script function p.get_best_script(str) -- Check type of argument, because mw.text.decode coerces numbers to strings! require "libraryUtil".checkType("get_best_script", 1, str, "string") -- Convert HTML character references (including named character references, -- or character entities) to characters. str = mw.text.decode(str, true) local scripts = {} for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) -- Ignore "Inherited", "Undetermined", or "Uncoded" scripts. if not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then scripts[script] = true end end -- If scripts does not contain two or more keys, -- return first and only key (script code) in table. if not next(scripts, next(scripts)) then return next(scripts) end -- else return majority script, or else "Zzzz"? end function p.is_Latin(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0340-U+10FFFF. If they are not found and there is at least -- one Latin-script character, the string counts as Latin, because the rest -- of the characters can only be Zyyy, Zinh, and Zzzz. -- The only scripts found below U+0370 (the first code point of the Greek -- and Coptic block) are Latn, Zyyy, Zinh, and Zzzz. -- See the codepage in the [[UTF-8]] article. if not str:find "[\205-\244]" then for codepoint in mw.ustring.gcodepoint(str) do if lookup_script(codepoint) == "Latn" then return true end end end local Latn = false for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if script == "Latn" then Latn = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return Latn end -- Checks that a string contains only characters belonging to right-to-left -- scripts, or characters of ignorable scripts. function p.is_rtl(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0580-U+10FFFF. If they are not found, the string can only -- have characters from a left-to-right script, because the first code point -- in a right-to-left script is U+0591, in the Hebrew block. if not str:find "[\214-\244]" then return false end local result = false local rtl = loader.scripts.rtl for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if rtl[script] then result = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return result end --[[--------------------------< I S _ R T L _ F R A M E >------------------------------------------------------ external entry from an {{#invoke:}} to determine if a string of text is rtl. Strips html and html-like tags so that those tags don't corrupt the is-rtl-is-not-rtl determination; this added for the cases where the rtl text has <br /> tags. ]] function p.is_rtl_frame (frame) local str = frame.args[1]; -- get the string from the {{#invoke:}} frame str = str:gsub ('%b<>', ''); -- strip any html and html-like tags return p.is_rtl (str); -- return if whatever remains rtl; false else end local function get_codepoint(args, arg) local codepoint_string = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) local codepoint = tonumber(codepoint_string, 16) or errorf(2, "Parameter %s is not a code point in hexadecimal base", tostring(arg)) if not (0 <= codepoint and codepoint <= 0x10FFFF) then errorf(2, "code point in parameter %s out of range", tostring(arg)) end return codepoint end local function get_func(args, arg, prefix) local suffix = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) suffix = mw.text.trim(suffix) local func_name = prefix .. suffix local func = p[func_name] or errorf(2, "There is no function '%s'", func_name) return func end -- This function allows any of the "lookup" functions to be invoked. The first -- parameter is the word after "lookup_"; the second parameter is the code point -- in hexadecimal base. function p.lookup(frame) local func = get_func(frame.args, 1, "lookup_") local codepoint = get_codepoint(frame.args, 2) local result = func(codepoint) if func == p.lookup_name then -- Prevent code point labels such as <control-0000> from being -- interpreted as HTML tags. result = result:gsub("<", "&lt;") end return result end function p.is(frame) local func = get_func(frame.args, 1, "is_") -- is_Latin and is_valid_pagename take strings. if func == p.is_Latin or func == p.is_valid_pagename or func == p.is_rtl then return (func(frame.args[2])) else -- The rest take code points. local codepoint = get_codepoint(frame.args, 2) return (func(codepoint)) -- Adjust to one result. end end return p 05d32e957906aa3f5219ad820cb06d9a096ea697 Template:Infobox/doc 10 70 137 2023-11-23T16:59:57Z wikipedia>DB1729 0 Reverted 1 edit by [[Special:Contributions/176.18.48.9|176.18.48.9]] ([[User talk:176.18.48.9|talk]]) to last revision by Tjmj wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{distinguish|Template:Userbox}} {{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}} {{Lua|Module:Infobox}} {{Parameter names example |name={{PAGENAME}} <!--|child |subbox |decat--> |title |above |subheader |subheader1 |subheader2={{{subheader2}}}<br/>...... |image|caption |image1|caption1 |image2|caption2={{{caption2}}}<br/>...... |header1=<div style="border-top:1px dashed #ccc;">{{{header1}}}<br/>{{nobold|( ''or'' )}}</div> |label2={{{label1}}} |data2={{{data1}}} |data3=( ''or'' ) |data4=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data1}}}</div> |header5={{{header2}}}<br/><div style="padding:0.75em 0 0.5em;">{{nobold|( ''or'' )}}</div> |label6={{{label2}}} |data6={{{data2}}} |data7=( ''or'' ) |data8=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data2}}}</div> |data9=<div style="padding:0.75em 0 0.5em;">( ''etc'' )</div> |below }} This template is intended as a meta template: a template used for constructing other templates. '''Note''': In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. [[Help:Infobox]] contains an introduction about the recommended content and design of infoboxes; [[Wikipedia:Manual of Style/Infoboxes]] contains additional style guidelines. See [[WP:List of infoboxes]] and [[:Category:Infobox templates]] for lists of prepared topic-specific infoboxes. == Usage == {{tlf|Infobox}} is a meta-template: used to organise an actual <nowiki>{{Infobox sometopic}}</nowiki> template (like {{tl|Infobox building}}). For <code><nowiki>[[Template:Infobox sometopic]]</nowiki></code>, template code then looks like this, simplified: <syntaxhighlight lang="wikitext"> {{Infobox | name = {{{name|{{PAGENAME}}}}} | image = {{{image|}}} | caption1 = {{{caption|}}} | label1 = Former names | data1 = {{{former_names|}}} | header2 = General information | label3 = Status | data3 = {{{status|}}} ... <!-- etc. --> }} </syntaxhighlight> == Optional control parameters == ; name : If this parameter is present, "view/talk/edit" links will be added to the bottom of the infobox pointing to the named page, prefixed by <code>Template:</code> if no namespace is specified. You may use the value <nowiki>{{subst:PAGENAME}}</nowiki>; however, this is rarely what you want because it will send users clicking these links in an infobox to the template code rather than the data in the infobox they probably want to change. ; child : See the [[#Embedding|Embedding]] section for details. If this is set to "yes", this child infobox should be titled but have no name parameter. This parameter is empty by default, set it to "yes" to activate it. ; subbox : See the [[#Subboxes|Subboxes]] section for details. If this is set to "yes", this subbox should be titled but have no name parameter. This parameter is empty by default, set to "yes" to activate it. It has no effect if the '''child''' parameter is also set to "yes". ; decat : If this is set to "yes", the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to "yes" to activate it. ; autoheaders: If this is set to any non-blank value, headers which are not followed by data fields are suppressed. See the "[[#Hiding headers when all its data fields are empty|hiding headers when all its data fields are empty]]" section for more details. == Content parameters == === Title === There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts it as a caption on top of the table. You can use them both together, or just one or the other, or neither (though this is not recommended): ; title : Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For [[Wikipedia:Manual of Style/Accessibility#Tables|accessibility reasons]], this is the most recommended alternative. ; above : Text to put within the uppermost cell of the table. ; subheader(n) : additional title fields which fit below {{{title}}} and {{{above}}}, but before images. Examples: {{Infobox | name = Infobox/doc | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }} </syntaxhighlight>{{clear}} {{Infobox | name = Infobox/doc | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }} </syntaxhighlight>{{clear}} === Illustration images === ; image(n) : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default. See [[WP:ALT]] for more on alt text. ; caption(n) : Text to put underneath the images. === Main data === ; header(n) : Text to use as a header in row n. ; label(n) : Text to use as a label in row n. ; data(n) : Text to display as data in row n. Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a {{para|header''(n)''}} will cause the corresponding {{para|data''(n)''}} (and {{para|rowclass''(n)''}} {{para|label''(n)''}}, see below) to be ignored; the absence of a {{para|data''(n)''}} will cause the corresponding {{para|label''(n)''}} to be ignored. Valid combinations for any single row are: * {{para|class''(n)''}} {{para|header''(n)''}} * {{para|rowclass''(n)''}} {{para|class''(n)''}} {{para|data''(n)''}} * {{para|rowclass''(n)''}} {{para|label''(n)''}} {{para|class''(n)''}} {{para|data''(n)''}} See the rendering of header4, label4, and data4 in the [[#Examples|Examples]] section below. ==== Number ranges ==== To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example: <syntaxhighlight lang="wikitext" style="overflow:auto"> | header3 = Section 1 | label5 = Label A | data5 = Data A | label7 = Label C | data7 = Data C | header10 = Section 2 | label12 = Label D | data12 = Data D </syntaxhighlight>{{clear}} It is also possible to automatically renumber parameter names by using [[User:Frietjes/infoboxgap.js]] or [[Module:IncrementParams]]. There is no upper limit on numbers but there must be at most 50 between each used number. ==== Making data fields optional ==== A row with a label but no data is not displayed. This allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so: <syntaxhighlight lang="wikitext" style="overflow:auto"> | label5 = Population | data5 = {{{population|}}} </syntaxhighlight>{{clear}} This way if an article doesn't define the population parameter in its infobox the row won't be displayed. For more complex fields with pre-formatted contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. For instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'": <syntaxhighlight lang="wikitext" style="overflow:auto"> | label6 = Mass | data6 = {{ #if: {{{mass|}}} | {{{mass}}} kg }} </syntaxhighlight>{{clear}} For more on #if, see [[meta:ParserFunctions##if:|here]]. ==== Hiding headers when all its data fields are empty ==== You can also make headers automatically hide when their section is empty (has no data-row showing). Consider this situation: {{Infobox | title = Example: header with & without data | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} </syntaxhighlight>{{clear}} If you want hide the header when no {{para|data''N''}} values are present, use '''{{para|autoheaders|y}}''': {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} </syntaxhighlight>{{clear}} So, header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no empty row appears before the next visible content. Note: if the data has empty css elements, like {{para|data|2=&lt;span style="background:yellow;">&lt;/span>}}, this will be treated as non-empty (having data). If {{para|autoheaders|y}} but there are items that you ''do not'' want to trigger a header, place {{para|headerX|_BLANK_}}. This will serve as an empty header and separate it from the subsequent items. {{Infobox | title = Example: blank header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = _BLANK_ | label6 = label6 text | data6 = Some value, but does not trigger header1 or show header5 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = _BLANK_ | label6 = label6 text | data6 = Some value, but does not trigger header1 or show header5 }} </syntaxhighlight>{{clear}} === Footer === ; below : Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information. == Presentation parameters == === Italic titles === Titles of articles with infoboxes may be made italic, in line with [[WP:ITALICTITLE]], by passing the <code>italic title</code> parameter. * Turn on italic titles by passing {{para|italic title|<nowiki>{{{italic title|}}}</nowiki>}} from the infobox. * Turn off by default (notably because only Latin script may be safely rendered in this style and italic may be needed to distinguish foreign language from local English language only in that script, but would be difficult to read for other scripts) but allow some instances to be made italic by passing {{para|italic title|<nowiki>{{{italic title|no}}}</nowiki>}} * Do not make any titles italic by not passing the parameter at all. === CSS styling === {{div col}} ; bodystyle : Applies to the infobox table as a whole ; titlestyle : Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered "outside" the infobox. ; abovestyle : Applies only to the "above" cell at the top. The default style has font-size:125%; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:100%;" in the abovestyle. ; imagestyle : Applies to the cell the image is in. This includes the text of the image caption, but you should set text properties with captionstyle instead of imagestyle in case the caption is moved out of this cell in the future. ; captionstyle : Applies to the text of the image caption. ; rowstyle(n) : This parameter is inserted into the <code>style</code> attribute for the specified row. ; headerstyle : Applies to all header cells ; subheaderstyle : Applies to all subheader cells ; labelstyle : Applies to all label cells ; datastyle : Applies to all data cells ; belowstyle : Applies only to the below cell {{div col end}} === HTML classes and microformats === {{div col}} ; bodyclass : This parameter is inserted into the <code>class</code> attribute for the infobox as a whole. ; titleclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''title''' caption. <!-- currently not implemented in Lua module ; aboverowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''above''' cell is on. --> ; aboveclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''above''' cell. ; subheaderrowclass(n) : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''subheader''' is on. ; subheaderclass(n) : This parameter is inserted into the <code>class</code> attribute for the infobox's '''subheader'''. ; imagerowclass(n) : These parameters are inserted into the <code>class</code> attribute for the complete table row their respective '''image''' is on. ; imageclass : This parameter is inserted into the <code>class</code> attribute for the '''image'''. ; rowclass(n) : This parameter is inserted into the <code>class</code> attribute for the specified row including the '''label''' and '''data''' cells. ; class(n) : This parameter is inserted into the <code>class</code> attribute for the '''data''' cell of the specified row. If there's no '''data''' cell it has no effect. <!-- currently not implemented in Lua module ; belowrowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''below''' cell is on. --> ; belowclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''below''' cell. {{div col end}} This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. Multiple class names may be specified, separated by spaces, some of them being used as selectors for custom styling according to a project policy or to the skin selected in user preferences, others being used for microformats. To flag an infobox as containing [[hCard]] information, for example, add the following parameter: <syntaxhighlight lang="wikitext" style="overflow:auto"> | bodyclass = vcard </syntaxhighlight>{{clear}} And for each row containing a data cell that's part of the vcard, add a corresponding class parameter: <syntaxhighlight lang="wikitext" style="overflow:auto"> | class1 = fn | class2 = org | class3 = tel </syntaxhighlight>{{clear}} ...and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox. See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [[microformat]] for more information on microformats in general. == Examples == Notice how the row doesn't appear in the displayed infobox when a '''label''' is defined without an accompanying '''data''' cell, and how all of them are displayed when a '''header''' is defined on the same row as a '''data''' cell. Also notice that '''subheaders''' are not bold by default like the '''headers''' used to split the main data section, because this role is meant to be for the '''above''' cell : {{Suppress categories| {{Infobox |name = Infobox/doc |bodystyle = |titlestyle = |abovestyle = background:#cfc; |subheaderstyle = |title = Test Infobox |above = Above text |subheader = Subheader above image |subheader2 = Second subheader |imagestyle = |captionstyle = |image = [[File:Example-serious.jpg|200px|alt=Example alt text]] |caption = Caption displayed below File:Example-serious.jpg |headerstyle = background:#ccf; |labelstyle = background:#ddf; |datastyle = |header1 = Header defined alone | label1 = | data1 = |header2 = | label2 = Label defined alone does not display (needs data, or is suppressed) | data2 = |header3 = | label3 = | data3 = Data defined alone |header4 = All three defined (header, label, data, all with same number) | label4 = does not display (same number as a header) | data4 = does not display (same number as a header) |header5 = | label5 = Label and data defined (label) | data5 = Label and data defined (data) |belowstyle = background:#ddf; |below = Below text }} }} <syntaxhighlight lang="wikitext"> {{Infobox |name = Infobox/doc |bodystyle = |titlestyle = |abovestyle = background:#cfc; |subheaderstyle = |title = Test Infobox |above = Above text |subheader = Subheader above image |subheader2 = Second subheader |imagestyle = |captionstyle = |image = [[File:Example-serious.jpg|200px|alt=Example alt text]] |caption = Caption displayed below File:Example-serious.jpg |headerstyle = background:#ccf; |labelstyle = background:#ddf; |datastyle = |header1 = Header defined alone | label1 = | data1 = |header2 = | label2 = Label defined alone does not display (needs data, or is suppressed) | data2 = |header3 = | label3 = | data3 = Data defined alone |header4 = All three defined (header, label, data, all with same number) | label4 = does not display (same number as a header) | data4 = does not display (same number as a header) |header5 = | label5 = Label and data defined (label) | data5 = Label and data defined (data) |belowstyle = background:#ddf; |below = Below text }} </syntaxhighlight> For this example, the {{para|bodystyle}} and {{para|labelstyle}} parameters are used to adjust the infobox width and define a default width for the column of labels: {{Infobox |name = Infobox/doc |bodystyle = width:20em |titlestyle = |title = Test Infobox |headerstyle = |labelstyle = width:33% |datastyle = |header1 = | label1 = Label 1 | data1 = Data 1 |header2 = | label2 = Label 2 | data2 = Data 2 |header3 = | label3 = Label 3 | data3 = Data 3 |header4 = Header 4 | label4 = | data4 = |header5 = | label5 = Label 5 | data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |belowstyle = |below = Below text }} <syntaxhighlight lang="wikitext"> {{Infobox |name = Infobox/doc |bodystyle = width:20em |titlestyle = |title = Test Infobox |headerstyle = |labelstyle = width:33% |datastyle = |header1 = | label1 = Label 1 | data1 = Data 1 |header2 = | label2 = Label 2 | data2 = Data 2 |header3 = | label3 = Label 3 | data3 = Data 3 |header4 = Header 4 | label4 = | data4 = |header5 = | label5 = Label 5 | data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |belowstyle = |below = Below text }} </syntaxhighlight> == Embedding == <!--Linked from [[Template:Subinfobox bodystyle/doc]]--> One infobox template can be embedded into another using the {{para|child}} parameter. This feature can be used to create a modular infobox, or to create better-defined logical sections. Long ago, it was necessary to use embedding in order to create infoboxes with more than 99 rows; but nowadays there's no limit to the number of rows that can be defined in a single instance of <code><nowiki>{{infobox}}</nowiki></code>. {{Infobox | title = Top level title | data1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | data2 = {{Infobox | decat = yes | child = yes |title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | data1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | data2 = {{Infobox | decat = yes | child = yes |title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} Note, in the examples above, the child infobox is placed in a <code>data</code> field, not a <code>header</code> field. Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a '''header''' field (but not in a '''label''' field because it would not be displayed!), either using {{Infobox | title = Top level title | header1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | header2 = {{Infobox | decat = yes | child = yes | title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | header1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | header2 = {{Infobox | decat = yes | child = yes | title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} or, {{Infobox | title = Top level title | header1 = First subsection {{Infobox | decat = yes | child = yes | label1 = Label 1.1 | data1 = Data 1.1 }} | header2 = Second subsection {{Infobox | decat = yes | child = yes | label1 = Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | header1 = First subsection {{Infobox | decat = yes | child = yes | label1 = Label 1.1 | data1 = Data 1.1 }} | header2 = Second subsection {{Infobox | decat = yes | child = yes | label1 = Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} Note that omitting the {{para|title}} parameter, and not including any text preceding the embedded infobox, may result in spurious blank table rows, creating gaps in the visual presentation. The garbage output can be suppressed using {{para|rowstyleN|display: none}}, replacing N with the data/header number. [[Wikipedia:WikiProject Infoboxes/embed]] includes some links to Wikipedia articles which include infoboxes embedded within other infoboxes. == Subboxes == An alternative method for embedding is to use {{para|subbox|yes}}, which removes the outer border from the infobox, but preserves the interior structure. One feature of this approach is that the parent and child boxes need not have the same structure, and the label and data fields are not aligned between the parent and child boxes because they are not in the same parent table. {{Infobox | headerstyle = background-color:#eee; | labelstyle = background-color:#eee; | header1 = Main 1 | header2 = Main 2 | data3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | data4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | label5 = Label 5 | data5 = Data 5 | header6 = Main 6 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | headerstyle = background-color:#eee; | labelstyle = background-color:#eee; | header1 = Main 1 | header2 = Main 2 | data3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | data4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | label5 = Label 5 | data5 = Data 5 | header6 = Main 6 }} </syntaxhighlight>{{clear}} Similar embedding techniques may be used within content parameters of some other templates generating tables (such as [[:Template:Sidebar|Sidebar]]) : {{Sidebar | navbar = off | headingstyle = background-color:#eee; | heading1 = Heading 1 | heading2 = Heading 2 | content3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | content4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | heading5 = Heading 5 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Sidebar | navbar = off | headingstyle = background-color:#eee; | heading1 = Heading 1 | heading2 = Heading 2 | content3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | content4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | heading5 = Heading 5 }} </syntaxhighlight>{{clear}} Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's a higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes. == Controlling line-breaking in embedded bulletless lists == Template {{tlx|nbsp}} may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists embedded in infoboxes (e.g. cast list in {{tlx|Infobox film}}), to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details. == Full blank syntax == (Note: there is no limit to the number of possible rows; only 20 are given below since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.) <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | child = {{{child|}}} | subbox = {{{subbox|}}} | italic title = {{{italic title|no}}} | templatestyles = | child templatestyles = | grandchild templatestyles = | bodystyle = | titlestyle = | abovestyle = | subheaderstyle = | title = | above = | subheader = | imagestyle = | captionstyle = | image = | caption = | image2 = | caption2 = | headerstyle = | labelstyle = | datastyle = | header1 = | label1 = | data1 = | header2 = | label2 = | data2 = | header3 = | label3 = | data3 = | header4 = | label4 = | data4 = | header5 = | label5 = | data5 = | header6 = | label6 = | data6 = | header7 = | label7 = | data7 = | header8 = | label8 = | data8 = | header9 = | label9 = | data9 = | header10 = | label10 = | data10 = | header11 = | label11 = | data11 = | header12 = | label12 = | data12 = | header13 = | label13 = | data13 = | header14 = | label14 = | data14 = | header15 = | label15 = | data15 = | header16 = | label16 = | data16 = | header17 = | label17 = | data17 = | header18 = | label18 = | data18 = | header19 = | label19 = | data19 = | header20 = | label20 = | data20 = | belowstyle = | below = }} </syntaxhighlight>{{clear}} {{Help:Infobox/user style}} == Porting to other MediaWikis == The infobox template requires the [[:mw:Extension:Scribunto|Scribunto]] and [[:mw:Extension:TemplateStyles|TemplateStyles]] extensions. [[Wikipedia:WikiProject Transwiki|WikiProject Transwiki]] has a version of this template that has been modified to work on other MediaWikis. == TemplateData == {{TemplateData header}} <templatedata> { "description": "This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.", "format": "{{_\n| ________________ = _\n}}\n", "params": { "title": { "label": "Title", "description": "Title displayed above the infobox", "type": "string", "suggested": true }, "image": { "label": "Image", "description": "Image illustrating the topic. Use full image syntax.", "type": "content", "suggested": true, "example": "[[File:example.png|200px|alt=Example alt text]]" }, "caption": { "label": "Caption", "description": "caption for the image", "type": "content", "suggested": true } }, "paramOrder": [ "title", "image", "caption" ] } </templatedata> ==Tracking categories== * {{Category link with count|Articles with missing Wikidata information}} * {{Category link with count|Articles using infobox templates with no data rows}} * {{Category link with count|Pages using embedded infobox templates with the title parameter}} ==See also== * [[Module:Infobox]], the [[WP:LUA|Lua]] module on which this template is based * [[Module:Check for unknown parameters]] * {{tl|Infobox3cols}} * {{tl|Navbox}} and {{tl|Sidebar}} * [[Wikipedia:List of infoboxes|List of infoboxes]] * [[:Module:InfoboxImage]] <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Infobox templates| ]] [[Category:Wikipedia metatemplates|Infobox]] [[Category:Templates generating microformats]] [[Category:Templates that add a tracking category]] [[Category:Templates based on the Infobox Lua module]] }}</includeonly> b7ba187ea76ee960bbe295ad01c44c646eaedadb Module:Message box/configuration 828 10 17 2023-11-24T02:41:46Z wikipedia>Pppery 0 Per edit request Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } ccb6bdf2868087b6833d203307f2f6a92b3b0a01 Template:Template parameter usage 10 59 115 2023-11-27T06:57:32Z wikipedia>Sdkb 0 Partial revert of [[User:SUM1]]'s edit [[Special:Diff/1039918972]] per [[WP:CLICKHERE]] wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|S|s}}ee a monthly parameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}} in articles{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{documentation}} </noinclude> 83e574f5e031df639a2cdcef5b91d6b1094ae648 Template:TemplateData header 10 58 113 2023-12-01T11:27:04Z wikipedia>Gonnym 0 fix website link if |1= is used wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Category:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> 748b89c815a11e78b365c5617460ea569f3f96cb Template:Defn 10 208 525 2023-12-21T20:20:00Z wikipedia>Ahecht 0 safesubst<noinclude/>: wikitext text/x-wiki <dd class="glossary {{{class|}}}" {{safesubst<noinclude/>:#if:{{{id|}}}|id="{{{id}}}"|{{safesubst<noinclude/>:#if:{{{term|}}}|id="{{{term}}}-defn{{{2|{{{no|1}}}}}}"|}}|}} {{safesubst<noinclude/>:#if:{{{style|}}}|style="{{{style}}}"|}}>{{safesubst<noinclude/>:#if:{{{2|{{{no|}}}}}}|{{{2|{{{no}}}}}}.&nbsp;&nbsp;|}}{{{defn|{{{1|{{{content}}}}}}}}}</dd><noinclude> {{Documentation}}<!--Categories go in the /doc subpage.--> </noinclude> 2df82518d4086f1630b1828aa60c6e82dbdee5a2 Template:Term 10 211 531 2023-12-21T20:22:58Z wikipedia>Ahecht 0 safesubst<noinclude/>: wikitext text/x-wiki <dt class="glossary {{{class|}}}" {{safesubst<noinclude/>:#if: {{{noid|}}}||id="{{safesubst<noinclude/>:#invoke:delink|delink|{{safesubst<noinclude/>:#invoke:String|replace|source={{safesubst<noinclude/>:lc:{{{id|{{{term|{{{1}}}}}}}}}}}|"|<!--blank to strip out double quote mark-->}}}}"}} style="{{safesubst<noinclude/>:#if:{{{multi|}}}|margin-top: -0.2em;|margin-top: 0.4em; {{{style|}}}}}">{{safesubst<noinclude/>:#if:{{{nondefining|}}}||<dfn class="glossary">}}{{{content|{{{2|{{{term|{{{1}}}}}}}}}}}}{{safesubst<noinclude/>:#if:{{{nondefining|}}}||</dfn>}}</dt><noinclude> {{Documentation}} </noinclude> ee17e48e6080c0ed3b54933f07c39046d852627f Template:Columns-list 10 194 497 2023-12-22T03:07:49Z wikipedia>Ahecht 0 If we're making the meat of the template substable, the rest should be too wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#if:{{{1|}}}|{{<includeonly>safesubst:</includeonly>#invoke:Template wrapper|wrap|_template=div col|_alias-map=1:content|colwidth=30em}}}}{{<includeonly>safesubst:</includeonly>#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using columns-list with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Columns-list]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | class | content | colwidth | gap | rules | small | style }}<noinclude> {{documentation}} </noinclude> 63b94b07a4d48047a0a217207f690036c3479aea Template:Bold list 10 226 563 2023-12-28T06:48:03Z wikipedia>Aidan9382 0 Undid revision 1192213097 by [[Special:Contributions/103.127.23.112|103.127.23.112]] ([[User talk:103.127.23.112|talk]]) wikitext text/x-wiki <includeonly>{{{{{|safesubst:}}}#invoke:Bold list|main|conj={{{conj|or}}}}}</includeonly><noinclude>{{{{BASEPAGENAME}}|A|B|C}} {{Documentation}}</noinclude> 2a2ac83abf84eb3db2c1d0b15b6c66cf88f18e99 Module:Documentation 828 50 97 2024-01-07T08:09:04Z wikipedia>DannyS712 0 remove unneeded return variables (if this breaks anything feel free to revert without discussing with me first) Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p d6c1bffca24be2d81fa882315ac613f5bb6b227c Module:High-use 828 60 117 2024-01-07T08:12:24Z wikipedia>DannyS712 0 remove unneeded return variables (if this breaks anything feel free to revert without discussing with me first) Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return "a very large number of" else return "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) if frame.args[1] == "risk" then return "risk" else local count = _fetch(frame) if count and count >= 100000 then return "risk" end end return "" end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p a459a733eb5996799f56287d6a2d2159739768d7 Module:List 828 19 35 2024-01-08T18:18:39Z wikipedia>Pppery 0 Reverted edit by [[Special:Contribs/Pppery|Pppery]] ([[User talk:Pppery|talk]]) to last version by Izno Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a 36 35 2024-02-06T23:44:51Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:List]]: w Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Template:Markup/row 10 217 543 2024-01-13T20:01:03Z wikipedia>Rodejong 0 Why not?? wikitext text/x-wiki <noinclude>{| style="border-width:medium;"</noinclude><includeonly>{{#if:{{{c1|value}}}|&#32; {{!-}} {{!}}style{{=}}"background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"{{!}} <!-- -->{{#tag:pre |{{{c1|[markup]}}}|style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap; {{{c1style|}}}"}} {{!}}style{{=}}"background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"{{!}} <!-- --><div style="{{{c2style|}}}"> {{{c2|[''rendering'']}}} </div> }}</includeonly><!-- --><noinclude> |- |style="border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:text-top;"| |style="border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:text-top;"| |- |}{{Documentation}}</noinclude> 0fa88a4f848315c0f4a50447fdb8fa334e4b38e7 Module:Effective protection level 828 30 57 2024-01-15T21:44:42Z wikipedia>Pppery 0 Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts if title.namespace == 0 then return 'autoconfirmed' -- Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace end return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p b6cb1e5589ec6575118f60841644cd65defa7174 58 57 2024-02-06T23:44:55Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Effective_protection_level]]: w Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts if title.namespace == 0 then return 'autoconfirmed' -- Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace end return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p b6cb1e5589ec6575118f60841644cd65defa7174 Module:Lang/data 828 94 261 2024-01-27T15:19:18Z wikipedia>Trappist the monk 0 better; Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> iana registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source.active then -- for ~/iana_languages (active) for k, v in pairs (source.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Language/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Language/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Language/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug colsole: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite exisiting name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["smp"] = "Samaritan Hebrew", -- to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A -- ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ca-x-old"] = "Old Catalan", ["cel-x-combrit"] = "Common Brittonic", -- cel in IANA is Celtic languages ["cel-x-proto"] = "Proto-Celtic", ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmw-x-ecg"] = "East Central German", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koinē Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["inc-x-mitanni"] = "Mitanni-Aryan", -- inc in IANA is Indic languages ["inc-x-proto"] = "Proto-Indo-Aryan", ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", ["xsc-x-pontic"] = "Pontic Scythian", -- xsc in IANA is Scythian ["xsc-x-saka"] = "Saka", ["xsc-x-sarmat"] = "Sarmatian", } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name>-language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij"] = "Ligurian (Romance language)", -- Ligurian; see Template_talk:Lang#Ligurian_dab ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ['qwm'] = "Kuman (Russia)", -- Kuman (Russia); to avoid Kuman dab page ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["toi"] = "Tonga language (Zambia and Zimbabwe)", -- Tonga (Zambia and Zimbabwe); to avoid Tonga language dab page ["vwa"] = "Awa language (China)", -- Awa (China); to avoid Awa dab page ["xlg"] = "Ligurian (ancient language)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['pny'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, }; return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; 21c8141ea9d590d8db51d505f22d6ef0554cc75d Module:Transclusion count/data/I 828 69 135 2024-02-04T05:24:04Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["IAST"] = 6600, ["IBDB_name"] = 9200, ["ICD10"] = 4800, ["ICD9"] = 4400, ["ICS"] = 2900, ["IDN"] = 3500, ["IMDb_episode"] = 10000, ["IMDb_episodes"] = 2800, ["IMDb_name"] = 156000, ["IMDb_title"] = 193000, ["IMO_Number"] = 4100, ["IMSLP"] = 8400, ["INA"] = 2200, ["IND"] = 7700, ["INR"] = 6700, ["INRConvert"] = 5800, ["INRConvert/CurrentRate"] = 5800, ["INRConvert/USD"] = 5700, ["INRConvert/out"] = 5700, ["IOBDB_name"] = 2000, ["IP"] = 2600, ["IPA"] = 145000, ["IPA-de"] = 8300, ["IPA-es"] = 7900, ["IPA-fr"] = 44000, ["IPA-it"] = 5900, ["IPA-nl"] = 3900, ["IPA-pl"] = 4100, ["IPA-pt"] = 3300, ["IPA-sl"] = 6900, ["IPA-th"] = 3000, ["IPA_audio_link"] = 3500, ["IPA_link"] = 3800, ["IPAc-cmn"] = 2300, ["IPAc-en"] = 49000, ["IPAc-pl"] = 51000, ["IPC_athlete"] = 3000, ["IPSummary"] = 78000, ["IP_summary"] = 79000, ["IPtalk"] = 18000, ["IPuser"] = 7100, ["IPvandal"] = 2700, ["IRC"] = 7300, ["IRI"] = 2300, ["IRL"] = 5500, ["IRN"] = 3700, ["ISBN"] = 463000, ["ISBN?"] = 2100, ["ISBNT"] = 39000, ["ISBN_missing"] = 2700, ["ISFDB_name"] = 4100, ["ISFDB_title"] = 4600, ["ISL"] = 2200, ["ISO_15924/script-example-character"] = 2800, ["ISO_15924/wp-article"] = 2800, ["ISO_15924/wp-article/format"] = 2800, ["ISO_15924/wp-article/label"] = 2800, ["ISO_3166_code"] = 501000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 8300, ["ISP"] = 4600, ["ISR"] = 4900, ["ISSN"] = 12000, ["ISSN_link"] = 30000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2500, ["ITA"] = 18000, ["ITF"] = 6300, ["ITF_profile"] = 9100, ["ITIS"] = 4500, ["ITN_talk"] = 10000, ["ITN_talk/date"] = 10000, ["IUCN_banner"] = 15000, ["I_sup"] = 4600, ["Ice_hockey"] = 8000, ["Ice_hockey_stats"] = 19000, ["Icehockeystats"] = 12000, ["Icon"] = 583000, ["If"] = 282000, ["If_all"] = 6600, ["If_between"] = 3800, ["If_both"] = 131000, ["If_empty"] = 3730000, ["If_first_display_both"] = 73000, ["If_in_page"] = 11000, ["If_last_display_both"] = 31000, ["If_preview"] = 58000, ["If_then_show"] = 304000, ["Ifempty"] = 4000, ["Ifeq"] = 17000, ["Iferror_then_show"] = 3300, ["Ifexist_not_redirect"] = 1330000, ["Ifnotempty"] = 15000, ["Ifnumber"] = 37000, ["Ifsubst"] = 463000, ["Ih"] = 7600, ["Ill"] = 128000, ["Illm"] = 6600, ["Image_frame"] = 5000, ["Image_label"] = 4500, ["Image_label_begin"] = 3800, ["Image_label_end"] = 3800, ["Image_label_small"] = 2600, ["Image_needed"] = 4900, ["Image_other"] = 271000, ["Image_requested"] = 169000, ["Image_requested/Category_helper"] = 161000, ["Imbox"] = 923000, ["Imdb_name"] = 5200, ["Imdb_title"] = 3400, ["Import_style"] = 11000, ["Import_style/inputbox.css"] = 11000, ["Importance"] = 15000, ["Importance/colour"] = 30000, ["Importance_mask"] = 10500000, ["Improve_categories"] = 7700, ["Improve_documentation"] = 2700, ["In_class"] = 5600, ["In_lang"] = 361000, ["In_progress"] = 3300, ["In_string"] = 79000, ["In_title"] = 20000, ["Inactive_userpage_blanked"] = 4900, ["Include-USGov"] = 27000, ["Incomplete_list"] = 23000, ["Inconclusive"] = 2100, ["Increase"] = 45000, ["Incumbent_pope"] = 4300, ["Indent"] = 4700, ["IndexFungorum"] = 2200, ["Indian_English"] = 4400, ["Indian_Rupee"] = 11000, ["Indian_railway_code"] = 3200, ["Inflation"] = 21000, ["Inflation-fn"] = 5500, ["Inflation-year"] = 4600, ["Inflation/IN/startyear"] = 5800, ["Inflation/UK"] = 4500, ["Inflation/UK/dataset"] = 4500, ["Inflation/UK/startyear"] = 4500, ["Inflation/US"] = 13000, ["Inflation/US-GDP"] = 2400, ["Inflation/US-GDP/dataset"] = 2400, ["Inflation/US-GDP/startyear"] = 2400, ["Inflation/US/dataset"] = 13000, ["Inflation/US/startyear"] = 13000, ["Inflation/fn"] = 6400, ["Inflation/year"] = 26000, ["Info"] = 7200, ["Infobox"] = 3250000, ["Infobox/Columns"] = 2500, ["Infobox/mobileviewfix.css"] = 147000, ["Infobox3cols"] = 17000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5300, ["Infobox_Aircraft_Type"] = 4600, ["Infobox_Athletics_Championships"] = 2800, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2100, ["Infobox_COA_wide"] = 3300, ["Infobox_Canada_electoral_district"] = 2500, ["Infobox_Canadian_Football_League_biography"] = 5700, ["Infobox_Canadian_Football_League_biography/position"] = 5600, ["Infobox_Chinese"] = 21000, ["Infobox_Chinese/Chinese"] = 2800, ["Infobox_Chinese/Footer"] = 8600, ["Infobox_Chinese/Header"] = 8600, ["Infobox_Chinese/Korean"] = 17000, ["Infobox_Christian_leader"] = 18000, ["Infobox_French_commune"] = 38000, ["Infobox_GAA_player"] = 2600, ["Infobox_Gaelic_games_player"] = 5000, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Grand_Prix_race_report"] = 2000, ["Infobox_Greece_place"] = 2900, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2600, ["Infobox_Indian_constituency"] = 5200, ["Infobox_Indian_constituency/defaultdata"] = 5200, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 15000, ["Infobox_NASCAR_race_report"] = 2300, ["Infobox_NCAA_team_season"] = 17000, ["Infobox_NFL_biography"] = 28000, ["Infobox_NFL_player"] = 7500, ["Infobox_NFL_team_season"] = 3900, ["Infobox_NRHP"] = 73000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 66000, ["Infobox_Officeholder"] = 4500, ["Infobox_Olympic_event"] = 7400, ["Infobox_Olympic_event/games_text"] = 7400, ["Infobox_Pan_American_Games_event"] = 2300, ["Infobox_Paralympic_event"] = 2600, ["Infobox_Paralympic_event/games_text"] = 2600, ["Infobox_Politician"] = 2100, ["Infobox_Romanian_subdivision"] = 3200, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4500, ["Infobox_SCOTUS_case"] = 3700, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 19000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_constituency"] = 2100, ["Infobox_UK_constituency/year"] = 2100, ["Infobox_UK_legislation"] = 3600, ["Infobox_UK_place"] = 26000, ["Infobox_UK_place/NoDialCode"] = 8100, ["Infobox_UK_place/NoPostCode"] = 3300, ["Infobox_UK_place/area"] = 2500, ["Infobox_UK_place/dens"] = 2100, ["Infobox_UK_place/dist"] = 2600, ["Infobox_UK_place/local"] = 26000, ["Infobox_UK_place/styles.css"] = 26000, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 3900, ["Infobox_US_Supreme_Court_case/courts"] = 3900, ["Infobox_Wikipedia_user"] = 10000, ["Infobox_YouTube_personality"] = 2800, ["Infobox_YouTube_personality/styles.css"] = 2800, ["Infobox_academic"] = 14000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2300, ["Infobox_aircraft_type"] = 13000, ["Infobox_airline"] = 4600, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 15000, ["Infobox_album"] = 163000, ["Infobox_album/color"] = 194000, ["Infobox_album/link"] = 163000, ["Infobox_anatomy"] = 4500, ["Infobox_ancient_site"] = 5600, ["Infobox_animanga/Footer"] = 6900, ["Infobox_animanga/Header"] = 7000, ["Infobox_animanga/Print"] = 5600, ["Infobox_animanga/Video"] = 4800, ["Infobox_architect"] = 3800, ["Infobox_artist"] = 29000, ["Infobox_artist_discography"] = 6000, ["Infobox_artwork"] = 12000, ["Infobox_athlete"] = 2800, ["Infobox_automobile"] = 8500, ["Infobox_award"] = 13000, ["Infobox_badminton_player"] = 3200, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_baseball_team_season"] = 3300, ["Infobox_baseball_team_season/leagueseason"] = 3200, ["Infobox_baseball_team_season/season"] = 3200, ["Infobox_baseball_team_season/styles.css"] = 3200, ["Infobox_basketball_biography"] = 21000, ["Infobox_basketball_biography/style"] = 21000, ["Infobox_basketball_club"] = 3000, ["Infobox_basketball_club/styles.css"] = 3100, ["Infobox_beauty_pageant"] = 2400, ["Infobox_bilateral_relations"] = 4500, ["Infobox_body_of_water"] = 18000, ["Infobox_book"] = 53000, ["Infobox_boxer"] = 5800, ["Infobox_bridge"] = 6100, ["Infobox_building"] = 28000, ["Infobox_character"] = 7500, ["Infobox_chess_biography"] = 4100, ["Infobox_chess_player"] = 3300, ["Infobox_church"] = 15000, ["Infobox_church/denomination"] = 15000, ["Infobox_church/font_color"] = 15000, ["Infobox_civil_conflict"] = 2500, ["Infobox_civilian_attack"] = 5700, ["Infobox_college_coach"] = 12000, ["Infobox_college_football_game"] = 2100, ["Infobox_college_football_player"] = 2300, ["Infobox_college_sports_team_season"] = 40000, ["Infobox_college_sports_team_season/link"] = 40000, ["Infobox_college_sports_team_season/name"] = 40000, ["Infobox_college_sports_team_season/succession"] = 40000, ["Infobox_college_sports_team_season/team"] = 40000, ["Infobox_comic_book_title"] = 3100, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3500, ["Infobox_comics_creator/styles.css"] = 3500, ["Infobox_company"] = 84000, ["Infobox_computing_device"] = 2400, ["Infobox_concert"] = 3300, ["Infobox_constituency"] = 5600, ["Infobox_country"] = 6500, ["Infobox_country/formernext"] = 6100, ["Infobox_country/imagetable"] = 5300, ["Infobox_country/multirow"] = 8400, ["Infobox_country/status_text"] = 2800, ["Infobox_country/styles.css"] = 6600, ["Infobox_country_at_games"] = 15000, ["Infobox_country_at_games/core"] = 15000, ["Infobox_country_at_games/see_also"] = 12000, ["Infobox_court_case"] = 4800, ["Infobox_court_case/images"] = 2500, ["Infobox_cricket_tournament"] = 2400, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7600, ["Infobox_criminal"] = 6600, ["Infobox_curler"] = 2600, ["Infobox_cycling_race_report"] = 4600, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5700, ["Infobox_deity"] = 2000, ["Infobox_deity/color"] = 2000, ["Infobox_designation_list"] = 20000, ["Infobox_designation_list/entry"] = 18000, ["Infobox_dim"] = 7000, ["Infobox_dim/core"] = 7000, ["Infobox_diocese"] = 3800, ["Infobox_drug"] = 10000, ["Infobox_drug/chemical_formula"] = 10000, ["Infobox_drug/data_page_link"] = 10000, ["Infobox_drug/formatATC"] = 10000, ["Infobox_drug/formatCASnumber"] = 10000, ["Infobox_drug/formatChEBI"] = 10000, ["Infobox_drug/formatChEMBL"] = 10000, ["Infobox_drug/formatChemDBNIAID"] = 10000, ["Infobox_drug/formatChemSpider"] = 10000, ["Infobox_drug/formatCompTox"] = 10000, ["Infobox_drug/formatDrugBank"] = 10000, ["Infobox_drug/formatIUPHARBPS"] = 10000, ["Infobox_drug/formatJmol"] = 10000, ["Infobox_drug/formatKEGG"] = 10000, ["Infobox_drug/formatPDBligand"] = 9400, ["Infobox_drug/formatPubChemCID"] = 10000, ["Infobox_drug/formatPubChemSID"] = 10000, ["Infobox_drug/formatUNII"] = 10000, ["Infobox_drug/legal_status"] = 10000, ["Infobox_drug/licence"] = 10000, ["Infobox_drug/maintenance_categories"] = 10000, ["Infobox_drug/non-ref-space"] = 4400, ["Infobox_drug/pregnancy_category"] = 10000, ["Infobox_drug/title"] = 10000, ["Infobox_election"] = 31000, ["Infobox_election/row"] = 31000, ["Infobox_election/shortname"] = 29000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 7400, ["Infobox_event"] = 5600, ["Infobox_family"] = 2200, ["Infobox_figure_skater"] = 4200, ["Infobox_film"] = 159000, ["Infobox_film/short_description"] = 155000, ["Infobox_film_awards"] = 2700, ["Infobox_film_awards/link"] = 2700, ["Infobox_film_awards/style"] = 2700, ["Infobox_food"] = 7000, ["Infobox_football_biography"] = 208000, ["Infobox_football_club"] = 28000, ["Infobox_football_club_season"] = 21000, ["Infobox_football_league"] = 2600, ["Infobox_football_league_season"] = 20000, ["Infobox_football_match"] = 6000, ["Infobox_football_tournament_season"] = 8100, ["Infobox_former_subdivision"] = 3400, ["Infobox_former_subdivision/styles.css"] = 3400, ["Infobox_galaxy"] = 2100, ["Infobox_game"] = 2600, ["Infobox_game_score"] = 3500, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4100, ["Infobox_golfer"] = 4500, ["Infobox_golfer/highest_ranking"] = 4500, ["Infobox_government_agency"] = 11000, ["Infobox_government_cabinet"] = 2700, ["Infobox_gridiron_football_person"] = 2300, ["Infobox_gridiron_football_person/position"] = 5600, ["Infobox_gymnast"] = 3600, ["Infobox_handball_biography"] = 5000, ["Infobox_historic_site"] = 12000, ["Infobox_horseraces"] = 2600, ["Infobox_hospital"] = 6400, ["Infobox_hospital/care_system"] = 6400, ["Infobox_hospital/lists"] = 6400, ["Infobox_ice_hockey_biography"] = 20000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 3000, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_international_football_competition"] = 5900, ["Infobox_islands"] = 9000, ["Infobox_islands/area"] = 9400, ["Infobox_islands/density"] = 9400, ["Infobox_islands/length"] = 9000, ["Infobox_islands/styles.css"] = 9000, ["Infobox_journal"] = 9800, ["Infobox_journal/Abbreviation_search"] = 9600, ["Infobox_journal/Bluebook_check"] = 9500, ["Infobox_journal/Former_check"] = 9500, ["Infobox_journal/ISO_4_check"] = 9500, ["Infobox_journal/ISSN-eISSN"] = 9500, ["Infobox_journal/Indexing_search"] = 9600, ["Infobox_journal/MathSciNet_check"] = 9500, ["Infobox_journal/NLM_check"] = 9500, ["Infobox_journal/frequency"] = 8600, ["Infobox_lake"] = 4200, ["Infobox_language"] = 9600, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6600, ["Infobox_language/linguistlist"] = 9600, ["Infobox_language/ref"] = 7100, ["Infobox_law_enforcement_agency"] = 2000, ["Infobox_legislation"] = 2000, ["Infobox_legislature"] = 3800, ["Infobox_library"] = 2200, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 5000, ["Infobox_magazine"] = 7700, ["Infobox_manner_of_address"] = 3400, ["Infobox_mapframe"] = 82000, ["Infobox_martial_artist"] = 5700, ["Infobox_martial_artist/record"] = 5700, ["Infobox_medal_templates"] = 424000, ["Infobox_medical_condition"] = 10000, ["Infobox_medical_condition_(new)"] = 8100, ["Infobox_medical_details"] = 2100, ["Infobox_military_conflict"] = 23000, ["Infobox_military_installation"] = 9800, ["Infobox_military_person"] = 46000, ["Infobox_military_unit"] = 26000, ["Infobox_mine"] = 2100, ["Infobox_model"] = 2300, ["Infobox_monument"] = 2100, ["Infobox_mountain"] = 28000, ["Infobox_multi-sport_competition_event"] = 2400, ["Infobox_museum"] = 11000, ["Infobox_musical_artist"] = 122000, ["Infobox_musical_artist/color"] = 122000, ["Infobox_musical_artist/hCard_class"] = 316000, ["Infobox_musical_composition"] = 3000, ["Infobox_name"] = 7500, ["Infobox_name_module"] = 7300, ["Infobox_newspaper"] = 9800, ["Infobox_nobility"] = 2300, ["Infobox_noble"] = 7400, ["Infobox_officeholder"] = 226000, ["Infobox_officeholder/office"] = 232000, ["Infobox_official_post"] = 8300, ["Infobox_organization"] = 37000, ["Infobox_pageant_titleholder"] = 3000, ["Infobox_park"] = 7700, ["Infobox_person"] = 488000, ["Infobox_person/Wikidata"] = 4600, ["Infobox_person/height"] = 104000, ["Infobox_person/length"] = 7100, ["Infobox_person/weight"] = 67000, ["Infobox_philosopher"] = 3500, ["Infobox_planet"] = 4700, ["Infobox_play"] = 4000, ["Infobox_political_party"] = 14000, ["Infobox_power_station"] = 3100, ["Infobox_prepared_food"] = 3000, ["Infobox_professional_wrestler"] = 4300, ["Infobox_professional_wrestling_event"] = 2700, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2400, ["Infobox_racehorse"] = 5600, ["Infobox_racing_driver"] = 4200, ["Infobox_racing_driver_series_section"] = 2300, ["Infobox_radio_show"] = 2000, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 3000, ["Infobox_rail_line"] = 7300, ["Infobox_rail_service"] = 3000, ["Infobox_rail_service/doc"] = 3000, ["Infobox_reality_competition_season"] = 3600, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6600, ["Infobox_religious_biography"] = 5400, ["Infobox_religious_building"] = 13000, ["Infobox_religious_building/color"] = 18000, ["Infobox_restaurant"] = 3100, ["Infobox_river"] = 30000, ["Infobox_river/calcunit"] = 30000, ["Infobox_river/discharge"] = 30000, ["Infobox_river/row-style"] = 30000, ["Infobox_river/source"] = 30000, ["Infobox_road"] = 24000, ["Infobox_road/meta/mask/category"] = 24000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2300, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 22000, ["Infobox_royalty/short_description"] = 12000, ["Infobox_rugby_biography"] = 16000, ["Infobox_rugby_biography/correct_date"] = 16000, ["Infobox_rugby_biography/depcheck"] = 16000, ["Infobox_rugby_league_biography"] = 10000, ["Infobox_rugby_league_biography/PLAYER"] = 9900, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2300, ["Infobox_saint"] = 5100, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5700, ["Infobox_school_district/styles.css"] = 5700, ["Infobox_scientist"] = 49000, ["Infobox_service_record"] = 2600, ["Infobox_settlement"] = 564000, ["Infobox_settlement/areadisp"] = 240000, ["Infobox_settlement/columns"] = 95000, ["Infobox_settlement/columns/styles.css"] = 95000, ["Infobox_settlement/densdisp"] = 440000, ["Infobox_settlement/impus"] = 82000, ["Infobox_settlement/lengthdisp"] = 170000, ["Infobox_settlement/link"] = 95000, ["Infobox_settlement/metric"] = 213000, ["Infobox_settlement/pref"] = 295000, ["Infobox_settlement/styles.css"] = 564000, ["Infobox_ship_begin"] = 41000, ["Infobox_ship_career"] = 37000, ["Infobox_ship_characteristics"] = 41000, ["Infobox_ship_class_overview"] = 4100, ["Infobox_ship_image"] = 40000, ["Infobox_shopping_mall"] = 3500, ["Infobox_short_story"] = 2400, ["Infobox_skier"] = 2600, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 77000, ["Infobox_song/color"] = 77000, ["Infobox_song/link"] = 77000, ["Infobox_spaceflight"] = 3600, ["Infobox_spaceflight/styles.css"] = 3600, ["Infobox_sport_event"] = 2200, ["Infobox_sports_competition_event"] = 18000, ["Infobox_sports_competition_event/medalrow"] = 12000, ["Infobox_sports_league"] = 5100, ["Infobox_sports_season"] = 5500, ["Infobox_sports_team"] = 2300, ["Infobox_sportsperson"] = 108000, ["Infobox_stadium"] = 3200, ["Infobox_station"] = 55000, ["Infobox_station/doc"] = 55000, ["Infobox_station/services"] = 55000, ["Infobox_station/styles.css"] = 55000, ["Infobox_street"] = 3500, ["Infobox_swimmer"] = 9400, ["Infobox_television"] = 57000, ["Infobox_television/Short_description"] = 55000, ["Infobox_television_channel"] = 6200, ["Infobox_television_episode"] = 12000, ["Infobox_television_episode/styles.css"] = 12000, ["Infobox_television_season"] = 9700, ["Infobox_television_station"] = 3500, ["Infobox_tennis_biography"] = 10000, ["Infobox_tennis_event"] = 2600, ["Infobox_tennis_tournament_event"] = 19000, ["Infobox_tennis_tournament_year"] = 9300, ["Infobox_tennis_tournament_year/color"] = 29000, ["Infobox_tennis_tournament_year/footer"] = 29000, ["Infobox_tournament_season"] = 11000, ["Infobox_train"] = 2300, ["Infobox_university"] = 26000, ["Infobox_user"] = 2700, ["Infobox_venue"] = 18000, ["Infobox_video_game"] = 28000, ["Infobox_video_game/styles.css"] = 28000, ["Infobox_volleyball_biography"] = 5500, ["Infobox_weapon"] = 7400, ["Infobox_weather_event"] = 2100, ["Infobox_weather_event/Effects"] = 2100, ["Infobox_weather_event/Footer"] = 2100, ["Infobox_weather_event/History"] = 2000, ["Infobox_weather_event/meteorology"] = 2000, ["Infobox_weather_event/styles.css"] = 2100, ["Infobox_website"] = 7700, ["Infobox_writer"] = 40000, ["Information"] = 98000, ["Information/styles.css"] = 98000, ["Inline"] = 2000, ["Inline_block"] = 4700, ["Inprogress"] = 2500, ["Input_link"] = 32000, ["Instagram"] = 11000, ["Interlanguage_link"] = 166000, ["Interlanguage_link_multi"] = 17000, ["Internet_Archive_author"] = 19000, ["Internet_Archive_film"] = 2600, ["Intitle"] = 13000, ["Iptalk"] = 17000, ["IranCensus2006"] = 45000, ["IranNCSGN"] = 3200, ["Iran_Census_2006"] = 45000, ["Irc"] = 2100, ["Irish_place_name"] = 2700, ["IsIPAddress"] = 37000, ["IsValidPageName"] = 2600, ["Is_MLB_league"] = 3200, ["Is_NPB_league"] = 3200, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 14000, ["Is_interwiki_link"] = 6000, ["Is_italic_taxon"] = 503000, ["Is_redirect"] = 28000, ["Isbn"] = 8100, ["Isfdb_name"] = 3500, ["Isfdb_title"] = 4300, ["Isnumeric"] = 144000, ["Iso2continent"] = 36000, ["Iso2country"] = 23000, ["Iso2country/article"] = 23000, ["Iso2country/data"] = 23000, ["Iso2nationality"] = 206000, ["Issubst"] = 71000, ["Isu_name"] = 2200, ["Italic_dab2"] = 5300, ["Italic_title"] = 274000, ["Italic_title_prefixed"] = 8600, ["Italics_colon"] = 3900, ["Italictitle"] = 3800, ["Ivm"] = 5700, ["Ivm/styles.css"] = 5700, ["Ivmbox"] = 124000, ["Ivory_messagebox"] = 147000, ["Module:I18n/complex_date"] = 67000, ["Module:IP"] = 133000, ["Module:IPA"] = 145000, ["Module:IPA/data"] = 130000, ["Module:IPA/styles.css"] = 116000, ["Module:IPA_symbol"] = 5100, ["Module:IPA_symbol/data"] = 5100, ["Module:IPAc-en"] = 49000, ["Module:IPAc-en/data"] = 49000, ["Module:IPAc-en/phonemes"] = 49000, ["Module:IPAc-en/pronunciation"] = 49000, ["Module:IPAddress"] = 189000, ["Module:ISO_3166"] = 1020000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/CN"] = 2200, ["Module:ISO_3166/data/DE"] = 15000, ["Module:ISO_3166/data/ES"] = 3600, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6400, ["Module:ISO_3166/data/GR"] = 3100, ["Module:ISO_3166/data/IN"] = 29000, ["Module:ISO_3166/data/IR"] = 9700, ["Module:ISO_3166/data/National"] = 1020000, ["Module:ISO_3166/data/PL"] = 7500, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 25000, ["Module:ISO_3166/data/US"] = 85000, ["Module:ISO_639_name"] = 20000, ["Module:ISOdate"] = 67000, ["Module:Icon"] = 588000, ["Module:Icon/data"] = 588000, ["Module:If_any_equal"] = 2800, ["Module:If_empty"] = 3730000, ["Module:If_in_page"] = 11000, ["Module:If_preview"] = 303000, ["Module:If_preview/configuration"] = 303000, ["Module:If_preview/styles.css"] = 303000, ["Module:Import_style"] = 11000, ["Module:In_lang"] = 361000, ["Module:Indent"] = 4700, ["Module:Infobox"] = 4170000, ["Module:Infobox/dates"] = 70000, ["Module:Infobox/styles.css"] = 4430000, ["Module:Infobox3cols"] = 300000, ["Module:InfoboxImage"] = 4490000, ["Module:Infobox_body_of_water_tracking"] = 18000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 420000, ["Module:Infobox_military_conflict"] = 23000, ["Module:Infobox_military_conflict/styles.css"] = 23000, ["Module:Infobox_multi-lingual_name"] = 21000, ["Module:Infobox_multi-lingual_name/data"] = 21000, ["Module:Infobox_power_station"] = 3100, ["Module:Infobox_road"] = 25000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/errors"] = 24000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 25000, ["Module:Infobox_road/route"] = 26000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 57000, ["Module:Infobox_television_disambiguation_check"] = 64000, ["Module:Infobox_television_episode"] = 12000, ["Module:Infobox_television_season_disambiguation_check"] = 9200, ["Module:Infobox_television_season_name"] = 9700, ["Module:Internet_Archive"] = 19000, ["Module:IrelandByCountyCatNav"] = 3400, ["Module:Is_article"] = 2000, ["Module:Is_infobox_in_lead"] = 380000, ["Module:Is_instance"] = 328000, ["Module:Italic_title"] = 1130000, ["Module:Italic_title2"] = 5300, } f331ee8acc99d40e8b26b3635b7b6d21e99c0ef6 Module:Transclusion count/data/N 828 125 325 2024-02-04T05:24:54Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["N"] = 2700, ["N.b."] = 2100, ["N/A"] = 25000, ["N/a"] = 57000, ["NA-Class"] = 15000, ["NASTRO_comment"] = 31000, ["NBA_Draft_template_list"] = 3400, ["NBA_Year"] = 5700, ["NBA_color"] = 3600, ["NBA_color_cell"] = 4300, ["NBA_color_cell2"] = 3400, ["NBA_player_statistics_legend"] = 4700, ["NBA_player_statistics_start"] = 3900, ["NBbox"] = 3400, ["NCAA_color_cell"] = 11000, ["NCAA_secondary_color_cell"] = 4400, ["NCES_District_ID"] = 2600, ["NED"] = 9800, ["NEXTYEAR"] = 8000, ["NFLAltPrimaryStyle"] = 2300, ["NFLPrimaryStyle"] = 27000, ["NFLSecondaryColor"] = 18000, ["NFL_Roster_navbox_template_list"] = 2500, ["NFL_Year"] = 24000, ["NFL_predraft"] = 6600, ["NFL_predraft/check"] = 6600, ["NFL_predraft/ftin"] = 6600, ["NFLplayer"] = 2100, ["NFT"] = 6900, ["NFT_player"] = 31000, ["NGA"] = 3200, ["NGR"] = 2400, ["NHLE"] = 19000, ["NHLS_url"] = 2200, ["NLD"] = 11000, ["NLM_content"] = 2800, ["NOINDEX"] = 457000, ["NOMIS2011"] = 2300, ["NOR"] = 9500, ["NPG_name"] = 2100, ["NRDB_species"] = 7000, ["NRHP-PA"] = 2600, ["NRHPGoogleMapFootnote"] = 2500, ["NRHP_Focus"] = 73000, ["NRHP_color"] = 3700, ["NRHP_date_for_lists"] = 3100, ["NRHP_date_for_lists/dates"] = 3100, ["NRHP_header"] = 3400, ["NRHP_navigation_box"] = 8400, ["NRHP_row"] = 3400, ["NRHP_style"] = 70000, ["NRHP_url"] = 29000, ["NRHP_url/core"] = 31000, ["NRISref"] = 73000, ["NSWcity"] = 2100, ["NSWcity/core"] = 2100, ["NYCS_br"] = 2700, ["NYCS_time_2"] = 3100, ["NZL"] = 6800, ["NZ_electorate_link"] = 2400, ["Na"] = 2600, ["Nac"] = 2900, ["Namespace_detect"] = 569000, ["Namespace_detect_showall"] = 7700, ["Nastaliq"] = 11000, ["Nat_fs_end"] = 2500, ["National_Film_Awards/style"] = 2100, ["National_Heritage_List_for_England"] = 23000, ["National_Rail_style"] = 5700, ["National_Register_of_Historic_Places"] = 29000, ["National_Register_of_Historic_Places_in_Massachusetts"] = 4400, ["National_Register_of_Historic_Places_in_New_York"] = 5600, ["National_Register_of_Historic_Places_in_North_Carolina"] = 2900, ["National_Register_of_Historic_Places_in_Pennsylvania"] = 3200, ["National_Register_of_Historic_Places_in_Virginia"] = 3100, ["National_basketball_squad"] = 3200, ["National_field_hockey_squad"] = 4100, ["National_football_squad_end"] = 3000, ["National_football_squad_start/styles.css"] = 2400, ["National_rugby_union_team"] = 4300, ["National_squad"] = 42000, ["National_squad_no_numbers"] = 17000, ["National_volleyball_team"] = 2300, ["Native_name"] = 20000, ["Native_name_checker"] = 82000, ["Naval"] = 3400, ["Naval/core"] = 3400, ["Navbar"] = 38000, ["Navbar-collapsible"] = 3400, ["Navbar-header"] = 16000, ["Navbar-header/styles.css"] = 16000, ["Navbox"] = 2900000, ["Navbox_GR_munic"] = 3500, ["Navbox_Musical_artist"] = 9900, ["Navbox_bottom"] = 15000, ["Navbox_decade_list"] = 11000, ["Navbox_documentation"] = 34000, ["Navbox_ice_hockey"] = 3200, ["Navbox_musical_artist"] = 224000, ["Navbox_musical_artist/color"] = 224000, ["Navbox_rugby_league_squad"] = 4900, ["Navbox_season_by_team"] = 3200, ["Navbox_top"] = 15000, ["Navbox_visibility"] = 34000, ["Navbox_with_collapsible_groups"] = 136000, ["Navbox_with_collapsible_sections"] = 2400, ["Navbox_with_columns"] = 26000, ["Navboxes"] = 57000, ["Navboxes_colour"] = 4700, ["Navseasoncats"] = 229000, ["Navseasoncats_with_centuries_below_decade"] = 6800, ["Navseasoncats_with_decades_below_year"] = 16000, ["Navsource"] = 2500, ["Navy"] = 20000, ["Navy/core"] = 20000, ["Nay"] = 5900, ["Nbay"] = 5600, ["Nbhyph"] = 192000, ["Nbsp"] = 495000, ["Nbsp_to_space"] = 21000, ["Ndash"] = 22000, ["Nee"] = 10000, ["NeilBrownPlayers"] = 3100, ["New_user_bar"] = 57000, ["Newbot"] = 4200, ["Next_period"] = 22000, ["Nfly"] = 2200, ["Nihongo"] = 104000, ["Nihongo2"] = 12000, ["Nihongo_foot"] = 2700, ["No"] = 8900, ["No."] = 14000, ["No2"] = 11000, ["NoSpam"] = 3900, ["NoSpamEmail"] = 17000, ["No_col_break"] = 2300, ["No_col_break/styles.css"] = 2400, ["No_documentation"] = 2500, ["No_footnotes"] = 51000, ["No_ping"] = 382000, ["No_plot"] = 8300, ["No_redirect"] = 595000, ["No_spam"] = 317000, ["No_wrap"] = 2900, ["Nobold"] = 398000, ["Nobold/styles.css"] = 398000, ["Nobr"] = 5200, ["Nobreak"] = 669000, ["Nochange"] = 2600, ["Noindex"] = 4800, ["Noitalic"] = 4600, ["Noitalic/styles.css"] = 4600, ["Nom"] = 43000, ["Nominated"] = 7700, ["Non-English-language_text_category"] = 2700, ["Non-admin_closure"] = 3100, ["Non-admin_closure_(requested_moves)"] = 4600, ["Non-admin_comment"] = 2000, ["Non-album_single"] = 2000, ["Non-diffusing_subcategory"] = 16000, ["Non-free_2D_art"] = 7500, ["Non-free_3D_art"] = 2500, ["Non-free_album_cover"] = 212000, ["Non-free_audio_sample"] = 8500, ["Non-free_biog-pic"] = 27000, ["Non-free_book_cover"] = 56000, ["Non-free_character"] = 2500, ["Non-free_comic"] = 11000, ["Non-free_fair_use"] = 17000, ["Non-free_fair_use_in"] = 14000, ["Non-free_file_with_no_commercial_use_license"] = 2400, ["Non-free_film_poster"] = 27000, ["Non-free_film_screenshot"] = 5000, ["Non-free_game_cover"] = 8000, ["Non-free_game_screenshot"] = 4900, ["Non-free_historic_image"] = 16000, ["Non-free_image_data"] = 8400, ["Non-free_image_rationale"] = 9500, ["Non-free_logo"] = 157000, ["Non-free_magazine_cover"] = 7700, ["Non-free_media"] = 753000, ["Non-free_media_data"] = 9600, ["Non-free_media_rationale"] = 11000, ["Non-free_movie_poster"] = 25000, ["Non-free_newspaper_image"] = 2100, ["Non-free_poster"] = 81000, ["Non-free_promotional"] = 8800, ["Non-free_school_logo"] = 7400, ["Non-free_seal"] = 5800, ["Non-free_symbol"] = 5700, ["Non-free_television_screenshot"] = 16000, ["Non-free_title-card"] = 6200, ["Non-free_use_rationale"] = 518000, ["Non-free_use_rationale/styles.css"] = 706000, ["Non-free_use_rationale_2"] = 210000, ["Non-free_use_rationale_album_cover"] = 145000, ["Non-free_use_rationale_biog"] = 2100, ["Non-free_use_rationale_book_cover"] = 19000, ["Non-free_use_rationale_logo"] = 107000, ["Non-free_use_rationale_poster"] = 54000, ["Non-free_use_rationale_title-card"] = 3200, ["Non-free_use_rationale_video_cover"] = 6100, ["Non-free_use_rationale_video_game_cover"] = 11000, ["Non-free_video_cover"] = 16000, ["Non-free_video_game_cover"] = 22000, ["Non-free_video_game_cover/platform"] = 21000, ["Non-free_video_game_screenshot"] = 11000, ["Non-free_video_game_screenshot/platform"] = 9900, ["Non-free_with_NC"] = 2400, ["Non-free_with_permission"] = 2000, ["Non_breaking_hyphen"] = 192000, ["Nonumtoc"] = 2800, ["Nonumtoc/styles.css"] = 2800, ["Noping"] = 370000, ["Noprint"] = 2900, ["Noredirect"] = 8400, ["Normal"] = 6200, ["Normalwraplink"] = 4500, ["North_America_topic"] = 3600, ["Nospam"] = 26000, ["Not-PD-US-expired-min-year"] = 25000, ["Not_a_ballot"] = 7900, ["Not_a_forum"] = 7800, ["Not_a_typo"] = 12000, ["Not_around"] = 6500, ["Not_done"] = 20000, ["Notability"] = 61000, ["Notavote"] = 2200, ["Notdone"] = 5600, ["Note"] = 25000, ["NoteFoot"] = 4400, ["NoteTag"] = 4500, ["Note_label"] = 9100, ["Notelist"] = 205000, ["Notelist-lr"] = 3700, ["Notelist-ua"] = 7300, ["Notes"] = 5600, ["Noteslist"] = 3500, ["Notice"] = 116000, ["NovelsWikiProject"] = 8300, ["Nowiki_="] = 2300, ["Nowrap"] = 1500000, ["Np"] = 3400, ["Npby"] = 2500, ["Nq"] = 4100, ["Nrut"] = 4300, ["Ns"] = 2800, ["Ns0"] = 110000, ["Ns_has_subpages"] = 2510000, ["Nts"] = 21000, ["Ntsh"] = 3400, ["Number_of_defined_parameters"] = 5200, ["Number_table_sorting"] = 36000, ["Number_table_sorting_hidden"] = 3400, ["Number_to_word"] = 7600, ["Numero"] = 3700, ["Nutshell"] = 4000, ["Nw="] = 2300, ["Née"] = 2300, ["Module:Namespace_detect"] = 623000, ["Module:Namespace_detect/config"] = 4920000, ["Module:Namespace_detect/data"] = 4920000, ["Module:National_squad"] = 55000, ["Module:Native_name"] = 96000, ["Module:Navbar"] = 5520000, ["Module:Navbar/configuration"] = 5520000, ["Module:Navbar/styles.css"] = 4840000, ["Module:Navbox"] = 4530000, ["Module:Navbox/configuration"] = 4530000, ["Module:Navbox/styles.css"] = 4530000, ["Module:Navbox_ice_hockey"] = 3200, ["Module:Navbox_top_and_bottom"] = 15000, ["Module:Navbox_with_collapsible_groups"] = 146000, ["Module:Navboxes"] = 58000, ["Module:Nihongo"] = 106000, ["Module:No_ping"] = 456000, ["Module:Noinclude"] = 2100, ["Module:Ns_has_subpages"] = 2510000, ["Module:Number_table_sorting"] = 38000, } fb0d0a0c0ef9f67906607fa2dd4be9f1cb481e8f Module:Transclusion count/data/P 828 224 559 2024-02-04T05:25:14Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["P"] = 6200, ["P-phrases"] = 3400, ["P."] = 3700, ["P1"] = 148000, ["P2"] = 303000, ["PAGENAMEBASE"] = 1590000, ["PAGENAMEU"] = 66000, ["PAK"] = 3000, ["PD-US"] = 10000, ["PD-US-1923"] = 2200, ["PD-US-1923-abroad"] = 5600, ["PD-US-expired"] = 4500, ["PD-US-expired-abroad"] = 7100, ["PD-art"] = 3300, ["PD-ineligible-USonly"] = 5500, ["PD-notice"] = 22000, ["PD-old-100"] = 3700, ["PD-self"] = 34000, ["PD-textlogo"] = 6200, ["PDB_Gallery"] = 2900, ["PDanube"] = 3200, ["PER"] = 3200, ["PHI"] = 2600, ["PHL"] = 3600, ["PLANTS"] = 4000, ["PM20"] = 3300, ["PMID"] = 7100, ["POL"] = 65000, ["POR"] = 5000, ["POTD_default"] = 11000, ["POTD_image"] = 2800, ["POTD_navigation"] = 6900, ["POTDlink"] = 7400, ["POV"] = 7300, ["PR/header"] = 3100, ["PR/heading"] = 7200, ["PRT"] = 5800, ["PR_link"] = 103000, ["PS"] = 2900, ["Pad"] = 56000, ["Page"] = 4100, ["Page_name_sub"] = 46000, ["Page_needed"] = 19000, ["Page_tabs"] = 3600, ["Page_tabs/styles.css"] = 3600, ["Page_views"] = 2500, ["Pagelinks"] = 43000, ["Pagelist"] = 4600, ["Pagetype"] = 12200000, ["Paid"] = 9800, ["Para"] = 2330000, ["Parabr"] = 2900, ["Paragraph_break"] = 1250000, ["Param_value"] = 137000, ["Parameter_names_example"] = 2400, ["ParmPart"] = 13000, ["Partial"] = 2500, ["Partial_minor_planet_designation"] = 5700, ["Partly_done"] = 2800, ["Party_color"] = 76000, ["Party_color_cell"] = 4500, ["Party_name_with_color"] = 8100, ["Party_name_with_colour"] = 3300, ["Party_shading/Democratic"] = 15000, ["Party_shading/Independent"] = 2400, ["Party_shading/Republican"] = 15000, ["Party_stripe"] = 19000, ["Pass"] = 2700, ["Pb"] = 1230000, ["Pbox"] = 3100, ["Pbox/1"] = 3100, ["Peacock"] = 3300, ["Pedigree"] = 3900, ["Peer_review/heading"] = 10000, ["Peer_review_tools"] = 8400, ["Penalty_shoot-out"] = 4000, ["Pending"] = 4100, ["Pending_DYK_biographies"] = 2800, ["Pengoal"] = 9800, ["Penmiss"] = 11000, ["Percentage"] = 13000, ["Performance_key"] = 2500, ["Period_color"] = 24000, ["Period_end"] = 22000, ["Period_id"] = 24000, ["Period_start"] = 24000, ["PeruTasks"] = 16000, ["Phab"] = 6200, ["Phanerozoic_220px"] = 21000, ["PharmNavFootnote"] = 5300, ["Philippine_name"] = 2900, ["Philosophy"] = 2200, ["Photo_montage"] = 4700, ["Photo_requested"] = 104000, ["Photograph_requested"] = 3300, ["Photomontage"] = 4600, ["Physics"] = 3400, ["Picture_of_the_day"] = 7400, ["Pie_chart"] = 6100, ["Pie_chart/slice"] = 6100, ["Ping"] = 236000, ["Pipe"] = 106000, ["Place_name_disambiguation"] = 39000, ["Plain_link"] = 161000, ["Plain_list"] = 14000, ["Plain_text"] = 80000, ["Plainlink"] = 82000, ["Plainlist"] = 360000, ["Plainlist/styles.css"] = 2990000, ["Player"] = 3600, ["Player2"] = 2500, ["Please_check_ISSN"] = 15000, ["Plural"] = 106000, ["Pluralize_from_text"] = 1420000, ["Poem_quote"] = 3100, ["Poemquote"] = 2400, ["Politician_icon"] = 34000, ["Politician_icon2"] = 34000, ["Politics_sidebar_below"] = 19000, ["Politics_sidebar_title"] = 19000, ["Poll_top"] = 2000, ["Polluted_category"] = 2200, ["Polparty"] = 27000, ["Pop_density"] = 9100, ["Population_Germany"] = 14000, ["Portal"] = 9430000, ["Portal-Class"] = 7700, ["Portal-inline"] = 226000, ["Portal_bar"] = 115000, ["Portal_box"] = 2700, ["Portalbar"] = 12000, ["Portuguese_name"] = 8900, ["PosMapFS"] = 4300, ["Possible"] = 3500, ["Possibly_empty_category"] = 68000, ["Post-nominals"] = 53000, ["Post-nominals/AUS"] = 7700, ["Post-nominals/CAN"] = 9300, ["Post-nominals/GBR"] = 27000, ["Post-nominals/NZL"] = 4000, ["Postnominals"] = 9500, ["Pp"] = 15000, ["Pp-book-cover"] = 52000, ["Pp-extended"] = 2600, ["Pp-move"] = 8700, ["Pp-move-indef"] = 3000, ["Pp-pc"] = 3600, ["Pp-pc1"] = 2100, ["Pp-protected"] = 6900, ["Pp-semi-indef"] = 4500, ["Pp-template"] = 2700, ["Pp-vandalism"] = 2600, ["Precision"] = 274000, ["PresFoot"] = 2900, ["PresHead"] = 3300, ["PresRow"] = 3300, ["Press"] = 4800, ["Preview_warning"] = 33000, ["Primary_source_inline"] = 6000, ["Primary_sources"] = 31000, ["Principal_rank"] = 503000, ["Prl"] = 103000, ["Pro-wrestling"] = 3000, ["ProCyclingStats"] = 2400, ["ProQuest"] = 18000, ["Professional_wrestling_profiles"] = 2100, ["Professional_wrestling_results_table"] = 2600, ["Profit"] = 3800, ["Progress_box"] = 17000, ["Project-Class"] = 12000, ["Project_other"] = 16000, ["Proper_name"] = 2400, ["Prose"] = 3400, ["Proxy_block"] = 2200, ["Pso"] = 3300, ["Purge"] = 393000, ["Purge_button"] = 17000, ["Module:Page"] = 107000, ["Module:PageLinks"] = 43000, ["Module:Page_tabs"] = 3600, ["Module:Pagelist"] = 4600, ["Module:Pagetype"] = 16200000, ["Module:Pagetype/config"] = 16200000, ["Module:Pagetype/disambiguation"] = 3830000, ["Module:Pagetype/setindex"] = 3890000, ["Module:Pagetype/softredirect"] = 4380000, ["Module:ParameterCount"] = 902000, ["Module:Parameter_names_example"] = 2400, ["Module:Parameter_validation"] = 135000, ["Module:Parameter_validation/default_config"] = 135000, ["Module:Party_name_with_color"] = 8900, ["Module:Percentage"] = 13000, ["Module:Person_height"] = 262000, ["Module:Person_length"] = 7100, ["Module:Person_weight"] = 79000, ["Module:Photo_montage"] = 4700, ["Module:Plain_text"] = 1560000, ["Module:Political_party"] = 118000, ["Module:Political_party/A"] = 20000, ["Module:Political_party/B"] = 16000, ["Module:Political_party/C"] = 40000, ["Module:Political_party/D"] = 49000, ["Module:Political_party/E"] = 5600, ["Module:Political_party/F"] = 12000, ["Module:Political_party/G"] = 17000, ["Module:Political_party/H"] = 5300, ["Module:Political_party/I"] = 49000, ["Module:Political_party/J"] = 7400, ["Module:Political_party/K"] = 3800, ["Module:Political_party/L"] = 38000, ["Module:Political_party/M"] = 12000, ["Module:Political_party/N"] = 30000, ["Module:Political_party/O"] = 5200, ["Module:Political_party/P"] = 26000, ["Module:Political_party/R"] = 47000, ["Module:Political_party/S"] = 29000, ["Module:Political_party/T"] = 11000, ["Module:Political_party/U"] = 18000, ["Module:Political_party/V"] = 7400, ["Module:Political_party/W"] = 11000, ["Module:Pop_density"] = 9100, ["Module:PopulationFromWikidata"] = 6500, ["Module:Portal"] = 9760000, ["Module:Portal-inline"] = 227000, ["Module:Portal/images/a"] = 1650000, ["Module:Portal/images/aliases"] = 229000, ["Module:Portal/images/b"] = 2800000, ["Module:Portal/images/c"] = 1610000, ["Module:Portal/images/d"] = 103000, ["Module:Portal/images/e"] = 411000, ["Module:Portal/images/f"] = 814000, ["Module:Portal/images/g"] = 627000, ["Module:Portal/images/h"] = 429000, ["Module:Portal/images/i"] = 1080000, ["Module:Portal/images/j"] = 269000, ["Module:Portal/images/k"] = 72000, ["Module:Portal/images/l"] = 418000, ["Module:Portal/images/m"] = 629000, ["Module:Portal/images/n"] = 717000, ["Module:Portal/images/o"] = 404000, ["Module:Portal/images/other"] = 127000, ["Module:Portal/images/p"] = 857000, ["Module:Portal/images/q"] = 3100, ["Module:Portal/images/r"] = 371000, ["Module:Portal/images/s"] = 1580000, ["Module:Portal/images/t"] = 640000, ["Module:Portal/images/u"] = 1010000, ["Module:Portal/images/v"] = 286000, ["Module:Portal/images/w"] = 171000, ["Module:Portal/images/y"] = 33000, ["Module:Portal/images/z"] = 5500, ["Module:Portal/styles.css"] = 9430000, ["Module:Portal_bar"] = 135000, ["Module:Portal_bar/styles.css"] = 134000, ["Module:Professional_wrestling_profiles"] = 2200, ["Module:Professional_wrestling_results_table"] = 2600, ["Module:Progress_box"] = 17000, ["Module:Progress_box/config"] = 17000, ["Module:Progress_box/styles.css"] = 17000, ["Module:Protect"] = 110000, ["Module:Protected_edit_request"] = 48000, ["Module:Protection_banner"] = 56000, ["Module:Protection_banner/config"] = 56000, ["Module:Purge"] = 412000, } 49d6d65e8c371b076fef239e9164011804ccd70f Main Page 0 1 1 2024-02-06T23:06:28Z MediaWiki default 1 Welcome to Miraheze! wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phab:|Phabricator]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 21236ac3f8d65e5563b6da6b70815ca6bf1e6616 3 1 2024-02-06T23:34:30Z Otonashi Ayana 2 Replaced content with "__NOTOC__ <div style="width:100%;text-align:center"><div style="display:inline-block;border:1px solid black">[[File:World of horror logo.png]]</div></div>" wikitext text/x-wiki __NOTOC__ <div style="width:100%;text-align:center"><div style="display:inline-block;border:1px solid black">[[File:World of horror logo.png]]</div></div> b5e7c972808767155637a751ca35081dd6170e70 File:World of horror logo.png 6 2 2 2024-02-06T23:27:49Z Otonashi Ayana 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 MediaWiki:Common.css 8 3 4 2024-02-06T23:43:27Z Otonashi Ayana 2 Created page with "body{ background:black; color:white; } .mw-page-container{ background:rgb(49,49,49); } .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color:white; }" css text/css body{ background:black; color:white; } .mw-page-container{ background:rgb(49,49,49); } .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color:white; } e1219572a0b4554660cc279ae170ed9029b5a6d8 Template:Infobox 10 4 6 5 2024-02-06T23:44:44Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Infobox]]: w wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Module:Yesno 828 5 8 7 2024-02-06T23:44:45Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Yesno]]: w Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:Arguments 828 6 10 9 2024-02-06T23:44:45Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Arguments]]: w Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Template:Tl 10 7 12 11 2024-02-06T23:44:46Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Tl]]: w wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Template:Template link 10 8 14 13 2024-02-06T23:44:46Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_link]]: w wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Module:Message box 828 9 16 15 2024-02-06T23:44:47Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Message_box]]: w Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) f2fb84f7b817d2d88747f57c40902a0d8be8158a Module:Message box/configuration 828 10 18 17 2024-02-06T23:44:47Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Message_box/configuration]]: w Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } ccb6bdf2868087b6833d203307f2f6a92b3b0a01 Template:Yesno 10 11 20 19 2024-02-06T23:44:48Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Yesno]]: w wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Template:Main other 10 12 22 21 2024-02-06T23:44:48Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Main_other]]: w wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Template:Nobold 10 13 24 23 2024-02-06T23:44:48Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Nobold]]: w wikitext text/x-wiki <templatestyles src="Nobold/styles.css"/><span class="nobold">{{{1}}}</span><noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 9c92b5951772bb26ca0fbe9256418b65e47700dd Template:Nobold/styles.css 10 14 26 25 2024-02-06T23:44:49Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Nobold/styles.css]]: w text text/plain /* {{pp-template}} */ /* Styling for Template:Nobold */ .nobold { font-weight: normal; } 83e5f0adacf8c7984251f1fd9d11ed82ebaadf03 Module:Check for unknown parameters 828 15 28 27 2024-02-06T23:44:49Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Check_for_unknown_parameters]]: w Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Module:String 828 16 30 29 2024-02-06T23:44:50Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:String]]: w Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The first index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 2ad0905c56ef4955950b75a8f00974fe82aed5e4 Module:Infobox 828 17 32 31 2024-02-06T23:44:50Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Infobox]]: w Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:Infobox/styles.css 828 18 34 33 2024-02-06T23:44:51Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Infobox/styles.css]]: w text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:TableTools 828 20 38 37 2024-02-06T23:44:51Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:TableTools]]: w Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Template:Tlx 10 21 40 39 2024-02-06T23:44:52Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Tlx]]: w wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Template:Template link expanded 10 22 42 41 2024-02-06T23:44:52Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_link_expanded]]: w wikitext text/x-wiki {{#Invoke:Template link general|main|code=on}}<noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlx}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6c99696fee02f1da368ed20d2504e19bc15b1c13 Module:Template link general 828 23 44 43 2024-02-06T23:44:52Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Template_link_general]]: w Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Template:Template other 10 24 46 45 2024-02-06T23:44:53Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_other]]: w wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Template:Clear 10 25 48 47 2024-02-06T23:44:53Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Clear]]: w wikitext text/x-wiki <div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude> 38bab3e3d7fbd3d6800d46556e60bc6bac494d72 Template:Distinguish 10 26 50 49 2024-02-06T23:44:54Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Distinguish]]: w wikitext text/x-wiki {{#invoke:Distinguish|distinguish}}<noinclude><!-- splitting these lines causes {{Documentation}} template to terminate green shading when Distinguish is used in /doc pages. --> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis to Wikidata, not here! --> </noinclude> f949a4cbfd6eb0ab77b832e69059a40a964b1fd8 Template:Sidebar 10 27 52 51 2024-02-06T23:44:54Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Sidebar]]: w wikitext text/x-wiki {{#invoke:Sidebar|sidebar}}<noinclude> {{documentation}}</noinclude> ab2498000a99daf324f656b0badd187b4a3e2b42 Module:Distinguish 828 28 54 53 2024-02-06T23:44:54Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Distinguish]]: w Scribunto text/plain local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local mTableTools --initialize lazily local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} function p.distinguish(frame) mArguments = require('Module:Arguments') mTableTools = require('Module:TableTools') local args = mArguments.getArgs(frame) local selfref = args.selfref local text = args.text args = mTableTools.compressSparseArray(args) return p._distinguish(args, text, selfref) end function p._distinguish(args, text, selfref) checkType("_distinguish", 1, args, 'table') if #args == 0 and not text then return '' end local text = string.format( 'Not to be confused with %s.', text or mHatlist.orList(args, true) ) hnOptions = {selfref = selfref} return mHatnote._hatnote(text, hnOptions) end return p 0364d14af01fc656ad1d898c5036fbd12a7ca938 Module:Effective protection expiry 828 29 56 55 2024-02-06T23:44:55Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Effective_protection_expiry]]: w Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Module:File link 828 31 60 59 2024-02-06T23:44:55Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:File_link]]: w Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Module:Format link 828 32 62 61 2024-02-06T23:44:56Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Format_link]]: w Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f Module:Hatnote 828 33 64 63 2024-02-06T23:44:56Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Hatnote]]: w Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 Module:Hatnote/styles.css 828 34 66 65 2024-02-06T23:44:57Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Hatnote/styles.css]]: w text text/plain /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Module:Hatnote list 828 35 68 67 2024-02-06T23:44:57Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Hatnote_list]]: w Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation at end of string, ignoring italics and links local function punctuationCollapse (text) return text:match("[.?!]('?)%1(%]?)%2%.$") and text:sub(1, -2) or text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p 1c8e6212115f76ecc3db8d05137011cd18207988 Module:Navbar 828 36 70 69 2024-02-06T23:44:58Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Navbar]]: w Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = 'Special:EditPage/' .. title.fullText, ['url'] = false }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = 'Special:PageHistory/' .. title.fullText, ['url'] = false }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 047f307758c878eb3e99ed1768cc40920a6ec5fa Module:Navbar/configuration 828 37 72 71 2024-02-06T23:44:58Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Navbar/configuration]]: w Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Navbar/styles.css 828 38 74 73 2024-02-06T23:44:59Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Navbar/styles.css]]: w text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Module:Protection banner 828 39 76 75 2024-02-06T23:44:59Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Protection_banner]]: w Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Protection banner/config 828 40 78 77 2024-02-06T23:44:59Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Protection_banner/config]]: w Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } a20552ae38cb5253a4fa29aa126abc74215a589f Module:Sidebar 828 41 80 79 2024-02-06T23:45:00Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Sidebar]]: w Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function hasSubgroup(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.plainlist_templatestyles) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.hlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.hlist_templatestyles} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleclass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then root :tag('tr') :tag('td') :addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup or cfg.i18n.class.content) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles } } local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (child and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 71fe765846593e025ca2f94371315e9dbb5bb4d2 Module:Sidebar/configuration 828 42 82 81 2024-02-06T23:45:00Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Sidebar/configuration]]: w Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = 'Module:Sidebar/styles.css', hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content' } } } dc2a980ac2162a898f7c21e6d6ba7e994dfeb315 Module:Sidebar/styles.css 828 43 84 83 2024-02-06T23:45:00Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Sidebar/styles.css]]: w text text/plain /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: #f8f9fa; border: 1px solid #aaa; padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } 7d621b35a37807a103b59075851fe36201204ceb Template:Div col 10 44 86 85 2024-02-06T23:45:01Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Div_col]]: w wikitext text/x-wiki <includeonly><templatestyles src="Div col/styles.css"/><!-- --><div class="div-col {{#ifeq:{{{small|}}}|yes|div-col-small}} {{#ifeq:{{{rules|}}}|yes|div-col-rules}} {{{class|}}}" <!-- -->{{#if:{{{colwidth|}}}{{{gap|}}}{{{style|}}}|<!-- -->style="{{#if:{{{colwidth|}}}|column-width: {{{colwidth}}};}}{{#if:{{{gap|}}}|column-gap: {{{gap}}};}}{{#if:{{{style|}}}|{{{style}}}}}"<!-- -->}}><!-- -->{{#if:{{{content|}}}|{{{content}}}</div>}}<!-- Inventory how many pages use small=yes -->{{#ifeq:{{{small|}}}|yes|[[Category:Pages using div col with small parameter]]}}<!-- --></includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using div col with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Div col]] with unknown parameter "_VALUE_"; use colwidth= to specify column size |ignoreblank=y | class | colwidth | content | gap | rules | small | style }}<noinclude> {{Documentation}} </noinclude> 6e84133dd867d6c701e7b161878cf66665bb7eb7 Template:Div col/styles.css 10 45 88 87 2024-02-06T23:45:01Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Div_col/styles.css]]: w text text/plain /* {{pp|small=yes}} */ .div-col { margin-top: 0.3em; column-width: 30em; } .div-col-small { font-size: 90%; } .div-col-rules { column-rule: 1px solid #aaa; } /* Reset top margin for lists in div col */ .div-col dl, .div-col ol, .div-col ul { margin-top: 0; } /* Avoid elements breaking between columns See also Template:No col break */ .div-col li, .div-col dd { page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */ break-inside: avoid-column; } c6c2dc0cb2bab7a5f7b4eb938eebc5c67df087bc Template:Div col end 10 46 90 89 2024-02-06T23:45:01Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Div_col_end]]: w wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{Documentation|Template:Div col/doc}} </noinclude> 78088d41c21d779e3722f220fcc9773dfbbc1e4f Template:Yesno-no 10 47 92 91 2024-02-06T23:45:02Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Yesno-no]]: w wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Template:Para 10 48 94 93 2024-02-06T23:45:02Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Para]]: w wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 06006deea2ed5d552aab61b4332321ab749ae7e8 Template:Documentation 10 49 96 95 2024-02-06T23:45:03Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Documentation]]: w wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 170 96 2024-02-06T23:50:41Z Otonashi Ayana 2 1 revision imported from [[:meta:Template:Documentation]]: w wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 Module:Documentation 828 50 98 97 2024-02-06T23:45:03Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Documentation]]: w Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p d6c1bffca24be2d81fa882315ac613f5bb6b227c 172 98 2024-02-06T23:50:41Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Documentation]]: w Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p d6c1bffca24be2d81fa882315ac613f5bb6b227c Module:Documentation/config 828 51 100 99 2024-02-06T23:45:03Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Documentation/config]]: w Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 56b6127664e31128dea1cecf2e392cf9313df6a3 174 100 2024-02-06T23:50:41Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Documentation/config]]: w Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 56b6127664e31128dea1cecf2e392cf9313df6a3 Module:Documentation/styles.css 828 52 102 101 2024-02-06T23:45:04Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Documentation/styles.css]]: w text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb 180 102 2024-02-06T23:50:42Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Documentation/styles.css]]: w text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Template:Sandbox other 10 53 104 103 2024-02-06T23:45:05Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Sandbox_other]]: w wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 91e4ae891d6b791615152c1fbc971414961ba872 Template:Documentation subpage 10 54 106 105 2024-02-06T23:45:05Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Documentation_subpage]]: w wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 41ca90af0945442788a2dbd08c8c54a61a23c057 Template:Template link with link off 10 55 108 107 2024-02-06T23:45:05Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_link_with_link_off]]: w wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes|nolink=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlf}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> b099fea5d1f36b0b4b9cb253ad3a9f4e095f6851 Template:Tlf 10 56 110 109 2024-02-06T23:45:06Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Tlf]]: w wikitext text/x-wiki #REDIRECT [[Template:Template link with link off]] {{Redirect category shell| {{R from move}} }} 52759e1d3f7c9aa4a03d0b7d4f84f4c6adf53edf Template:High-use 10 57 112 111 2024-02-06T23:45:06Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:High-use]]: w wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> a3322d1bd47ac03df14fa2090855cff4fede9bc7 Template:TemplateData header 10 58 114 113 2024-02-06T23:45:06Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:TemplateData_header]]: w wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Category:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> 748b89c815a11e78b365c5617460ea569f3f96cb Template:Template parameter usage 10 59 116 115 2024-02-06T23:45:07Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_parameter_usage]]: w wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|S|s}}ee a monthly parameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}} in articles{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{documentation}} </noinclude> 83e574f5e031df639a2cdcef5b91d6b1094ae648 Module:High-use 828 60 118 117 2024-02-06T23:45:07Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:High-use]]: w Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return "a very large number of" else return "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) if frame.args[1] == "risk" then return "risk" else local count = _fetch(frame) if count and count >= 100000 then return "risk" end end return "" end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p a459a733eb5996799f56287d6a2d2159739768d7 Module:Transclusion count 828 61 120 119 2024-02-06T23:45:08Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Transclusion_count]]: w Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Module:Lua banner 828 62 122 121 2024-02-06T23:45:08Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Lua_banner]]: w Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Module:Parameter names example 828 63 124 123 2024-02-06T23:45:09Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Parameter_names_example]]: w Scribunto text/plain -- This module implements {{parameter names example}}. local p = {} local function makeParam(s) local lb = '&#123;' local rb = '&#125;' return lb:rep(3) .. s .. rb:rep(3) end local function italicize(s) return "''" .. s .. "''" end local function plain(s) return s end function p._main(args, frame) -- Find how we want to format the arguments to the template. local formatFunc if args._display == 'italics' or args._display == 'italic' then formatFunc = italicize elseif args._display == 'plain' then formatFunc = plain else formatFunc = makeParam end -- Build the table of template arguments. local targs = {} for k, v in pairs(args) do if type(k) == 'number' then targs[v] = formatFunc(v) elseif not k:find('^_') then targs[k] = v end end --targs['nocat'] = 'yes'; --targs['categories'] = 'no'; --targs['demo'] = 'yes'; -- Find the template name. local template if args._template then template = args._template else local currentTitle = mw.title.getCurrentTitle() if currentTitle.prefixedText:find('/sandbox$') then template = currentTitle.prefixedText else template = currentTitle.basePageTitle.prefixedText end end -- Call the template with the arguments. frame = frame or mw.getCurrentFrame() local success, result = pcall( frame.expandTemplate, frame, {title = template, args = targs} ) if success then return result else return '' end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Parameter names example' }) return p._main(args, frame) end return p fdf94fb7a5dc1fabf118d60488a02f1e65b0df24 Template:Lua 10 64 126 125 2024-02-06T23:45:09Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Lua]]: w wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Parameter names example 10 65 128 127 2024-02-06T23:45:09Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Parameter_names_example]]: w wikitext text/x-wiki <includeonly>{{#invoke:Parameter names example|main}}</includeonly><noinclude> {{documentation}}<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 256a11b9ae7ac7e492b3d9de86ade1ffa96bffd1 Template:Category link with count 10 66 130 129 2024-02-06T23:45:10Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Category_link_with_count]]: w wikitext text/x-wiki [[:Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|<!-- -->{{#if:{{{name|}}}|{{{name}}}|Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}}}<!-- -->]]&nbsp;({{PAGESINCATEGORY:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|{{{2|all}}}}})<noinclude> {{Documentation}} </noinclude> f93f1540b8c157703bd6d24ae35c35bef745981d Template:Suppress categories 10 67 132 131 2024-02-06T23:45:10Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Suppress_categories]]: w wikitext text/x-wiki <includeonly>{{{{{|safesubst:}}}#invoke:Suppress categories|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 1f9c6065201d31d4c70f982129b5babbb809ae8c Module:Suppress categories 828 68 134 133 2024-02-06T23:45:11Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Suppress_categories]]: w Scribunto text/plain -- This is a simple module to strip categories from wikitext. It does -- not support nested links or magic words like __TOC__, etc. Even so, -- it should still handle most categories. local p = {} -- Detects if a category link is valid or not. If it is valid, -- the function returns the blank string. If not, the input -- is returned with no changes. local function processCategory( all, submatch ) local beforePipe = mw.ustring.match( submatch, '^(.-)[%s_]*|[%s_]*.-$' ) beforePipe = beforePipe or submatch if mw.ustring.match( beforePipe, '[%[%]<>{}%c\n]' ) then return all else return '' end end -- Preprocess the content if we aren't being called from #invoke, -- and pass it to gsub to remove valid category links. local function suppress( content, isPreprocessed ) if not isPreprocessed then content = mw.getCurrentFrame():preprocess( content ) end content = mw.ustring.gsub( content, '(%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*(.-)[%s_]*%]%])', processCategory ) return content end -- Get the content to suppress categories from, and find -- whether the content has already been preprocessed. (If the -- module is called from #invoke, it has been preprocessed already.) function p.main( frame ) local content, isPreprocessed if frame == mw.getCurrentFrame() then content = frame:getParent().args[1] if frame.args[1] then content = frame.args[1] end isPreprocessed = true else content = frame isPreprocessed = false end return suppress( content, isPreprocessed ) end return p 0ec3903841c489357a879434c5dc23c11d182c78 Module:Transclusion count/data/I 828 69 136 135 2024-02-06T23:45:11Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Transclusion_count/data/I]]: w Scribunto text/plain return { ["IAST"] = 6600, ["IBDB_name"] = 9200, ["ICD10"] = 4800, ["ICD9"] = 4400, ["ICS"] = 2900, ["IDN"] = 3500, ["IMDb_episode"] = 10000, ["IMDb_episodes"] = 2800, ["IMDb_name"] = 156000, ["IMDb_title"] = 193000, ["IMO_Number"] = 4100, ["IMSLP"] = 8400, ["INA"] = 2200, ["IND"] = 7700, ["INR"] = 6700, ["INRConvert"] = 5800, ["INRConvert/CurrentRate"] = 5800, ["INRConvert/USD"] = 5700, ["INRConvert/out"] = 5700, ["IOBDB_name"] = 2000, ["IP"] = 2600, ["IPA"] = 145000, ["IPA-de"] = 8300, ["IPA-es"] = 7900, ["IPA-fr"] = 44000, ["IPA-it"] = 5900, ["IPA-nl"] = 3900, ["IPA-pl"] = 4100, ["IPA-pt"] = 3300, ["IPA-sl"] = 6900, ["IPA-th"] = 3000, ["IPA_audio_link"] = 3500, ["IPA_link"] = 3800, ["IPAc-cmn"] = 2300, ["IPAc-en"] = 49000, ["IPAc-pl"] = 51000, ["IPC_athlete"] = 3000, ["IPSummary"] = 78000, ["IP_summary"] = 79000, ["IPtalk"] = 18000, ["IPuser"] = 7100, ["IPvandal"] = 2700, ["IRC"] = 7300, ["IRI"] = 2300, ["IRL"] = 5500, ["IRN"] = 3700, ["ISBN"] = 463000, ["ISBN?"] = 2100, ["ISBNT"] = 39000, ["ISBN_missing"] = 2700, ["ISFDB_name"] = 4100, ["ISFDB_title"] = 4600, ["ISL"] = 2200, ["ISO_15924/script-example-character"] = 2800, ["ISO_15924/wp-article"] = 2800, ["ISO_15924/wp-article/format"] = 2800, ["ISO_15924/wp-article/label"] = 2800, ["ISO_3166_code"] = 501000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 8300, ["ISP"] = 4600, ["ISR"] = 4900, ["ISSN"] = 12000, ["ISSN_link"] = 30000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2500, ["ITA"] = 18000, ["ITF"] = 6300, ["ITF_profile"] = 9100, ["ITIS"] = 4500, ["ITN_talk"] = 10000, ["ITN_talk/date"] = 10000, ["IUCN_banner"] = 15000, ["I_sup"] = 4600, ["Ice_hockey"] = 8000, ["Ice_hockey_stats"] = 19000, ["Icehockeystats"] = 12000, ["Icon"] = 583000, ["If"] = 282000, ["If_all"] = 6600, ["If_between"] = 3800, ["If_both"] = 131000, ["If_empty"] = 3730000, ["If_first_display_both"] = 73000, ["If_in_page"] = 11000, ["If_last_display_both"] = 31000, ["If_preview"] = 58000, ["If_then_show"] = 304000, ["Ifempty"] = 4000, ["Ifeq"] = 17000, ["Iferror_then_show"] = 3300, ["Ifexist_not_redirect"] = 1330000, ["Ifnotempty"] = 15000, ["Ifnumber"] = 37000, ["Ifsubst"] = 463000, ["Ih"] = 7600, ["Ill"] = 128000, ["Illm"] = 6600, ["Image_frame"] = 5000, ["Image_label"] = 4500, ["Image_label_begin"] = 3800, ["Image_label_end"] = 3800, ["Image_label_small"] = 2600, ["Image_needed"] = 4900, ["Image_other"] = 271000, ["Image_requested"] = 169000, ["Image_requested/Category_helper"] = 161000, ["Imbox"] = 923000, ["Imdb_name"] = 5200, ["Imdb_title"] = 3400, ["Import_style"] = 11000, ["Import_style/inputbox.css"] = 11000, ["Importance"] = 15000, ["Importance/colour"] = 30000, ["Importance_mask"] = 10500000, ["Improve_categories"] = 7700, ["Improve_documentation"] = 2700, ["In_class"] = 5600, ["In_lang"] = 361000, ["In_progress"] = 3300, ["In_string"] = 79000, ["In_title"] = 20000, ["Inactive_userpage_blanked"] = 4900, ["Include-USGov"] = 27000, ["Incomplete_list"] = 23000, ["Inconclusive"] = 2100, ["Increase"] = 45000, ["Incumbent_pope"] = 4300, ["Indent"] = 4700, ["IndexFungorum"] = 2200, ["Indian_English"] = 4400, ["Indian_Rupee"] = 11000, ["Indian_railway_code"] = 3200, ["Inflation"] = 21000, ["Inflation-fn"] = 5500, ["Inflation-year"] = 4600, ["Inflation/IN/startyear"] = 5800, ["Inflation/UK"] = 4500, ["Inflation/UK/dataset"] = 4500, ["Inflation/UK/startyear"] = 4500, ["Inflation/US"] = 13000, ["Inflation/US-GDP"] = 2400, ["Inflation/US-GDP/dataset"] = 2400, ["Inflation/US-GDP/startyear"] = 2400, ["Inflation/US/dataset"] = 13000, ["Inflation/US/startyear"] = 13000, ["Inflation/fn"] = 6400, ["Inflation/year"] = 26000, ["Info"] = 7200, ["Infobox"] = 3250000, ["Infobox/Columns"] = 2500, ["Infobox/mobileviewfix.css"] = 147000, ["Infobox3cols"] = 17000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5300, ["Infobox_Aircraft_Type"] = 4600, ["Infobox_Athletics_Championships"] = 2800, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2100, ["Infobox_COA_wide"] = 3300, ["Infobox_Canada_electoral_district"] = 2500, ["Infobox_Canadian_Football_League_biography"] = 5700, ["Infobox_Canadian_Football_League_biography/position"] = 5600, ["Infobox_Chinese"] = 21000, ["Infobox_Chinese/Chinese"] = 2800, ["Infobox_Chinese/Footer"] = 8600, ["Infobox_Chinese/Header"] = 8600, ["Infobox_Chinese/Korean"] = 17000, ["Infobox_Christian_leader"] = 18000, ["Infobox_French_commune"] = 38000, ["Infobox_GAA_player"] = 2600, ["Infobox_Gaelic_games_player"] = 5000, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Grand_Prix_race_report"] = 2000, ["Infobox_Greece_place"] = 2900, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2600, ["Infobox_Indian_constituency"] = 5200, ["Infobox_Indian_constituency/defaultdata"] = 5200, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 15000, ["Infobox_NASCAR_race_report"] = 2300, ["Infobox_NCAA_team_season"] = 17000, ["Infobox_NFL_biography"] = 28000, ["Infobox_NFL_player"] = 7500, ["Infobox_NFL_team_season"] = 3900, ["Infobox_NRHP"] = 73000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 66000, ["Infobox_Officeholder"] = 4500, ["Infobox_Olympic_event"] = 7400, ["Infobox_Olympic_event/games_text"] = 7400, ["Infobox_Pan_American_Games_event"] = 2300, ["Infobox_Paralympic_event"] = 2600, ["Infobox_Paralympic_event/games_text"] = 2600, ["Infobox_Politician"] = 2100, ["Infobox_Romanian_subdivision"] = 3200, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4500, ["Infobox_SCOTUS_case"] = 3700, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 19000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_constituency"] = 2100, ["Infobox_UK_constituency/year"] = 2100, ["Infobox_UK_legislation"] = 3600, ["Infobox_UK_place"] = 26000, ["Infobox_UK_place/NoDialCode"] = 8100, ["Infobox_UK_place/NoPostCode"] = 3300, ["Infobox_UK_place/area"] = 2500, ["Infobox_UK_place/dens"] = 2100, ["Infobox_UK_place/dist"] = 2600, ["Infobox_UK_place/local"] = 26000, ["Infobox_UK_place/styles.css"] = 26000, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 3900, ["Infobox_US_Supreme_Court_case/courts"] = 3900, ["Infobox_Wikipedia_user"] = 10000, ["Infobox_YouTube_personality"] = 2800, ["Infobox_YouTube_personality/styles.css"] = 2800, ["Infobox_academic"] = 14000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2300, ["Infobox_aircraft_type"] = 13000, ["Infobox_airline"] = 4600, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 15000, ["Infobox_album"] = 163000, ["Infobox_album/color"] = 194000, ["Infobox_album/link"] = 163000, ["Infobox_anatomy"] = 4500, ["Infobox_ancient_site"] = 5600, ["Infobox_animanga/Footer"] = 6900, ["Infobox_animanga/Header"] = 7000, ["Infobox_animanga/Print"] = 5600, ["Infobox_animanga/Video"] = 4800, ["Infobox_architect"] = 3800, ["Infobox_artist"] = 29000, ["Infobox_artist_discography"] = 6000, ["Infobox_artwork"] = 12000, ["Infobox_athlete"] = 2800, ["Infobox_automobile"] = 8500, ["Infobox_award"] = 13000, ["Infobox_badminton_player"] = 3200, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_baseball_team_season"] = 3300, ["Infobox_baseball_team_season/leagueseason"] = 3200, ["Infobox_baseball_team_season/season"] = 3200, ["Infobox_baseball_team_season/styles.css"] = 3200, ["Infobox_basketball_biography"] = 21000, ["Infobox_basketball_biography/style"] = 21000, ["Infobox_basketball_club"] = 3000, ["Infobox_basketball_club/styles.css"] = 3100, ["Infobox_beauty_pageant"] = 2400, ["Infobox_bilateral_relations"] = 4500, ["Infobox_body_of_water"] = 18000, ["Infobox_book"] = 53000, ["Infobox_boxer"] = 5800, ["Infobox_bridge"] = 6100, ["Infobox_building"] = 28000, ["Infobox_character"] = 7500, ["Infobox_chess_biography"] = 4100, ["Infobox_chess_player"] = 3300, ["Infobox_church"] = 15000, ["Infobox_church/denomination"] = 15000, ["Infobox_church/font_color"] = 15000, ["Infobox_civil_conflict"] = 2500, ["Infobox_civilian_attack"] = 5700, ["Infobox_college_coach"] = 12000, ["Infobox_college_football_game"] = 2100, ["Infobox_college_football_player"] = 2300, ["Infobox_college_sports_team_season"] = 40000, ["Infobox_college_sports_team_season/link"] = 40000, ["Infobox_college_sports_team_season/name"] = 40000, ["Infobox_college_sports_team_season/succession"] = 40000, ["Infobox_college_sports_team_season/team"] = 40000, ["Infobox_comic_book_title"] = 3100, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3500, ["Infobox_comics_creator/styles.css"] = 3500, ["Infobox_company"] = 84000, ["Infobox_computing_device"] = 2400, ["Infobox_concert"] = 3300, ["Infobox_constituency"] = 5600, ["Infobox_country"] = 6500, ["Infobox_country/formernext"] = 6100, ["Infobox_country/imagetable"] = 5300, ["Infobox_country/multirow"] = 8400, ["Infobox_country/status_text"] = 2800, ["Infobox_country/styles.css"] = 6600, ["Infobox_country_at_games"] = 15000, ["Infobox_country_at_games/core"] = 15000, ["Infobox_country_at_games/see_also"] = 12000, ["Infobox_court_case"] = 4800, ["Infobox_court_case/images"] = 2500, ["Infobox_cricket_tournament"] = 2400, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7600, ["Infobox_criminal"] = 6600, ["Infobox_curler"] = 2600, ["Infobox_cycling_race_report"] = 4600, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5700, ["Infobox_deity"] = 2000, ["Infobox_deity/color"] = 2000, ["Infobox_designation_list"] = 20000, ["Infobox_designation_list/entry"] = 18000, ["Infobox_dim"] = 7000, ["Infobox_dim/core"] = 7000, ["Infobox_diocese"] = 3800, ["Infobox_drug"] = 10000, ["Infobox_drug/chemical_formula"] = 10000, ["Infobox_drug/data_page_link"] = 10000, ["Infobox_drug/formatATC"] = 10000, ["Infobox_drug/formatCASnumber"] = 10000, ["Infobox_drug/formatChEBI"] = 10000, ["Infobox_drug/formatChEMBL"] = 10000, ["Infobox_drug/formatChemDBNIAID"] = 10000, ["Infobox_drug/formatChemSpider"] = 10000, ["Infobox_drug/formatCompTox"] = 10000, ["Infobox_drug/formatDrugBank"] = 10000, ["Infobox_drug/formatIUPHARBPS"] = 10000, ["Infobox_drug/formatJmol"] = 10000, ["Infobox_drug/formatKEGG"] = 10000, ["Infobox_drug/formatPDBligand"] = 9400, ["Infobox_drug/formatPubChemCID"] = 10000, ["Infobox_drug/formatPubChemSID"] = 10000, ["Infobox_drug/formatUNII"] = 10000, ["Infobox_drug/legal_status"] = 10000, ["Infobox_drug/licence"] = 10000, ["Infobox_drug/maintenance_categories"] = 10000, ["Infobox_drug/non-ref-space"] = 4400, ["Infobox_drug/pregnancy_category"] = 10000, ["Infobox_drug/title"] = 10000, ["Infobox_election"] = 31000, ["Infobox_election/row"] = 31000, ["Infobox_election/shortname"] = 29000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 7400, ["Infobox_event"] = 5600, ["Infobox_family"] = 2200, ["Infobox_figure_skater"] = 4200, ["Infobox_film"] = 159000, ["Infobox_film/short_description"] = 155000, ["Infobox_film_awards"] = 2700, ["Infobox_film_awards/link"] = 2700, ["Infobox_film_awards/style"] = 2700, ["Infobox_food"] = 7000, ["Infobox_football_biography"] = 208000, ["Infobox_football_club"] = 28000, ["Infobox_football_club_season"] = 21000, ["Infobox_football_league"] = 2600, ["Infobox_football_league_season"] = 20000, ["Infobox_football_match"] = 6000, ["Infobox_football_tournament_season"] = 8100, ["Infobox_former_subdivision"] = 3400, ["Infobox_former_subdivision/styles.css"] = 3400, ["Infobox_galaxy"] = 2100, ["Infobox_game"] = 2600, ["Infobox_game_score"] = 3500, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4100, ["Infobox_golfer"] = 4500, ["Infobox_golfer/highest_ranking"] = 4500, ["Infobox_government_agency"] = 11000, ["Infobox_government_cabinet"] = 2700, ["Infobox_gridiron_football_person"] = 2300, ["Infobox_gridiron_football_person/position"] = 5600, ["Infobox_gymnast"] = 3600, ["Infobox_handball_biography"] = 5000, ["Infobox_historic_site"] = 12000, ["Infobox_horseraces"] = 2600, ["Infobox_hospital"] = 6400, ["Infobox_hospital/care_system"] = 6400, ["Infobox_hospital/lists"] = 6400, ["Infobox_ice_hockey_biography"] = 20000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 3000, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_international_football_competition"] = 5900, ["Infobox_islands"] = 9000, ["Infobox_islands/area"] = 9400, ["Infobox_islands/density"] = 9400, ["Infobox_islands/length"] = 9000, ["Infobox_islands/styles.css"] = 9000, ["Infobox_journal"] = 9800, ["Infobox_journal/Abbreviation_search"] = 9600, ["Infobox_journal/Bluebook_check"] = 9500, ["Infobox_journal/Former_check"] = 9500, ["Infobox_journal/ISO_4_check"] = 9500, ["Infobox_journal/ISSN-eISSN"] = 9500, ["Infobox_journal/Indexing_search"] = 9600, ["Infobox_journal/MathSciNet_check"] = 9500, ["Infobox_journal/NLM_check"] = 9500, ["Infobox_journal/frequency"] = 8600, ["Infobox_lake"] = 4200, ["Infobox_language"] = 9600, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6600, ["Infobox_language/linguistlist"] = 9600, ["Infobox_language/ref"] = 7100, ["Infobox_law_enforcement_agency"] = 2000, ["Infobox_legislation"] = 2000, ["Infobox_legislature"] = 3800, ["Infobox_library"] = 2200, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 5000, ["Infobox_magazine"] = 7700, ["Infobox_manner_of_address"] = 3400, ["Infobox_mapframe"] = 82000, ["Infobox_martial_artist"] = 5700, ["Infobox_martial_artist/record"] = 5700, ["Infobox_medal_templates"] = 424000, ["Infobox_medical_condition"] = 10000, ["Infobox_medical_condition_(new)"] = 8100, ["Infobox_medical_details"] = 2100, ["Infobox_military_conflict"] = 23000, ["Infobox_military_installation"] = 9800, ["Infobox_military_person"] = 46000, ["Infobox_military_unit"] = 26000, ["Infobox_mine"] = 2100, ["Infobox_model"] = 2300, ["Infobox_monument"] = 2100, ["Infobox_mountain"] = 28000, ["Infobox_multi-sport_competition_event"] = 2400, ["Infobox_museum"] = 11000, ["Infobox_musical_artist"] = 122000, ["Infobox_musical_artist/color"] = 122000, ["Infobox_musical_artist/hCard_class"] = 316000, ["Infobox_musical_composition"] = 3000, ["Infobox_name"] = 7500, ["Infobox_name_module"] = 7300, ["Infobox_newspaper"] = 9800, ["Infobox_nobility"] = 2300, ["Infobox_noble"] = 7400, ["Infobox_officeholder"] = 226000, ["Infobox_officeholder/office"] = 232000, ["Infobox_official_post"] = 8300, ["Infobox_organization"] = 37000, ["Infobox_pageant_titleholder"] = 3000, ["Infobox_park"] = 7700, ["Infobox_person"] = 488000, ["Infobox_person/Wikidata"] = 4600, ["Infobox_person/height"] = 104000, ["Infobox_person/length"] = 7100, ["Infobox_person/weight"] = 67000, ["Infobox_philosopher"] = 3500, ["Infobox_planet"] = 4700, ["Infobox_play"] = 4000, ["Infobox_political_party"] = 14000, ["Infobox_power_station"] = 3100, ["Infobox_prepared_food"] = 3000, ["Infobox_professional_wrestler"] = 4300, ["Infobox_professional_wrestling_event"] = 2700, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2400, ["Infobox_racehorse"] = 5600, ["Infobox_racing_driver"] = 4200, ["Infobox_racing_driver_series_section"] = 2300, ["Infobox_radio_show"] = 2000, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 3000, ["Infobox_rail_line"] = 7300, ["Infobox_rail_service"] = 3000, ["Infobox_rail_service/doc"] = 3000, ["Infobox_reality_competition_season"] = 3600, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6600, ["Infobox_religious_biography"] = 5400, ["Infobox_religious_building"] = 13000, ["Infobox_religious_building/color"] = 18000, ["Infobox_restaurant"] = 3100, ["Infobox_river"] = 30000, ["Infobox_river/calcunit"] = 30000, ["Infobox_river/discharge"] = 30000, ["Infobox_river/row-style"] = 30000, ["Infobox_river/source"] = 30000, ["Infobox_road"] = 24000, ["Infobox_road/meta/mask/category"] = 24000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2300, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 22000, ["Infobox_royalty/short_description"] = 12000, ["Infobox_rugby_biography"] = 16000, ["Infobox_rugby_biography/correct_date"] = 16000, ["Infobox_rugby_biography/depcheck"] = 16000, ["Infobox_rugby_league_biography"] = 10000, ["Infobox_rugby_league_biography/PLAYER"] = 9900, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2300, ["Infobox_saint"] = 5100, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5700, ["Infobox_school_district/styles.css"] = 5700, ["Infobox_scientist"] = 49000, ["Infobox_service_record"] = 2600, ["Infobox_settlement"] = 564000, ["Infobox_settlement/areadisp"] = 240000, ["Infobox_settlement/columns"] = 95000, ["Infobox_settlement/columns/styles.css"] = 95000, ["Infobox_settlement/densdisp"] = 440000, ["Infobox_settlement/impus"] = 82000, ["Infobox_settlement/lengthdisp"] = 170000, ["Infobox_settlement/link"] = 95000, ["Infobox_settlement/metric"] = 213000, ["Infobox_settlement/pref"] = 295000, ["Infobox_settlement/styles.css"] = 564000, ["Infobox_ship_begin"] = 41000, ["Infobox_ship_career"] = 37000, ["Infobox_ship_characteristics"] = 41000, ["Infobox_ship_class_overview"] = 4100, ["Infobox_ship_image"] = 40000, ["Infobox_shopping_mall"] = 3500, ["Infobox_short_story"] = 2400, ["Infobox_skier"] = 2600, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 77000, ["Infobox_song/color"] = 77000, ["Infobox_song/link"] = 77000, ["Infobox_spaceflight"] = 3600, ["Infobox_spaceflight/styles.css"] = 3600, ["Infobox_sport_event"] = 2200, ["Infobox_sports_competition_event"] = 18000, ["Infobox_sports_competition_event/medalrow"] = 12000, ["Infobox_sports_league"] = 5100, ["Infobox_sports_season"] = 5500, ["Infobox_sports_team"] = 2300, ["Infobox_sportsperson"] = 108000, ["Infobox_stadium"] = 3200, ["Infobox_station"] = 55000, ["Infobox_station/doc"] = 55000, ["Infobox_station/services"] = 55000, ["Infobox_station/styles.css"] = 55000, ["Infobox_street"] = 3500, ["Infobox_swimmer"] = 9400, ["Infobox_television"] = 57000, ["Infobox_television/Short_description"] = 55000, ["Infobox_television_channel"] = 6200, ["Infobox_television_episode"] = 12000, ["Infobox_television_episode/styles.css"] = 12000, ["Infobox_television_season"] = 9700, ["Infobox_television_station"] = 3500, ["Infobox_tennis_biography"] = 10000, ["Infobox_tennis_event"] = 2600, ["Infobox_tennis_tournament_event"] = 19000, ["Infobox_tennis_tournament_year"] = 9300, ["Infobox_tennis_tournament_year/color"] = 29000, ["Infobox_tennis_tournament_year/footer"] = 29000, ["Infobox_tournament_season"] = 11000, ["Infobox_train"] = 2300, ["Infobox_university"] = 26000, ["Infobox_user"] = 2700, ["Infobox_venue"] = 18000, ["Infobox_video_game"] = 28000, ["Infobox_video_game/styles.css"] = 28000, ["Infobox_volleyball_biography"] = 5500, ["Infobox_weapon"] = 7400, ["Infobox_weather_event"] = 2100, ["Infobox_weather_event/Effects"] = 2100, ["Infobox_weather_event/Footer"] = 2100, ["Infobox_weather_event/History"] = 2000, ["Infobox_weather_event/meteorology"] = 2000, ["Infobox_weather_event/styles.css"] = 2100, ["Infobox_website"] = 7700, ["Infobox_writer"] = 40000, ["Information"] = 98000, ["Information/styles.css"] = 98000, ["Inline"] = 2000, ["Inline_block"] = 4700, ["Inprogress"] = 2500, ["Input_link"] = 32000, ["Instagram"] = 11000, ["Interlanguage_link"] = 166000, ["Interlanguage_link_multi"] = 17000, ["Internet_Archive_author"] = 19000, ["Internet_Archive_film"] = 2600, ["Intitle"] = 13000, ["Iptalk"] = 17000, ["IranCensus2006"] = 45000, ["IranNCSGN"] = 3200, ["Iran_Census_2006"] = 45000, ["Irc"] = 2100, ["Irish_place_name"] = 2700, ["IsIPAddress"] = 37000, ["IsValidPageName"] = 2600, ["Is_MLB_league"] = 3200, ["Is_NPB_league"] = 3200, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 14000, ["Is_interwiki_link"] = 6000, ["Is_italic_taxon"] = 503000, ["Is_redirect"] = 28000, ["Isbn"] = 8100, ["Isfdb_name"] = 3500, ["Isfdb_title"] = 4300, ["Isnumeric"] = 144000, ["Iso2continent"] = 36000, ["Iso2country"] = 23000, ["Iso2country/article"] = 23000, ["Iso2country/data"] = 23000, ["Iso2nationality"] = 206000, ["Issubst"] = 71000, ["Isu_name"] = 2200, ["Italic_dab2"] = 5300, ["Italic_title"] = 274000, ["Italic_title_prefixed"] = 8600, ["Italics_colon"] = 3900, ["Italictitle"] = 3800, ["Ivm"] = 5700, ["Ivm/styles.css"] = 5700, ["Ivmbox"] = 124000, ["Ivory_messagebox"] = 147000, ["Module:I18n/complex_date"] = 67000, ["Module:IP"] = 133000, ["Module:IPA"] = 145000, ["Module:IPA/data"] = 130000, ["Module:IPA/styles.css"] = 116000, ["Module:IPA_symbol"] = 5100, ["Module:IPA_symbol/data"] = 5100, ["Module:IPAc-en"] = 49000, ["Module:IPAc-en/data"] = 49000, ["Module:IPAc-en/phonemes"] = 49000, ["Module:IPAc-en/pronunciation"] = 49000, ["Module:IPAddress"] = 189000, ["Module:ISO_3166"] = 1020000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/CN"] = 2200, ["Module:ISO_3166/data/DE"] = 15000, ["Module:ISO_3166/data/ES"] = 3600, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6400, ["Module:ISO_3166/data/GR"] = 3100, ["Module:ISO_3166/data/IN"] = 29000, ["Module:ISO_3166/data/IR"] = 9700, ["Module:ISO_3166/data/National"] = 1020000, ["Module:ISO_3166/data/PL"] = 7500, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 25000, ["Module:ISO_3166/data/US"] = 85000, ["Module:ISO_639_name"] = 20000, ["Module:ISOdate"] = 67000, ["Module:Icon"] = 588000, ["Module:Icon/data"] = 588000, ["Module:If_any_equal"] = 2800, ["Module:If_empty"] = 3730000, ["Module:If_in_page"] = 11000, ["Module:If_preview"] = 303000, ["Module:If_preview/configuration"] = 303000, ["Module:If_preview/styles.css"] = 303000, ["Module:Import_style"] = 11000, ["Module:In_lang"] = 361000, ["Module:Indent"] = 4700, ["Module:Infobox"] = 4170000, ["Module:Infobox/dates"] = 70000, ["Module:Infobox/styles.css"] = 4430000, ["Module:Infobox3cols"] = 300000, ["Module:InfoboxImage"] = 4490000, ["Module:Infobox_body_of_water_tracking"] = 18000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 420000, ["Module:Infobox_military_conflict"] = 23000, ["Module:Infobox_military_conflict/styles.css"] = 23000, ["Module:Infobox_multi-lingual_name"] = 21000, ["Module:Infobox_multi-lingual_name/data"] = 21000, ["Module:Infobox_power_station"] = 3100, ["Module:Infobox_road"] = 25000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/errors"] = 24000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 25000, ["Module:Infobox_road/route"] = 26000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 57000, ["Module:Infobox_television_disambiguation_check"] = 64000, ["Module:Infobox_television_episode"] = 12000, ["Module:Infobox_television_season_disambiguation_check"] = 9200, ["Module:Infobox_television_season_name"] = 9700, ["Module:Internet_Archive"] = 19000, ["Module:IrelandByCountyCatNav"] = 3400, ["Module:Is_article"] = 2000, ["Module:Is_infobox_in_lead"] = 380000, ["Module:Is_instance"] = 328000, ["Module:Italic_title"] = 1130000, ["Module:Italic_title2"] = 5300, } f331ee8acc99d40e8b26b3635b7b6d21e99c0ef6 Template:Infobox/doc 10 70 138 137 2024-02-06T23:45:13Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Infobox/doc]]: w wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{distinguish|Template:Userbox}} {{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}} {{Lua|Module:Infobox}} {{Parameter names example |name={{PAGENAME}} <!--|child |subbox |decat--> |title |above |subheader |subheader1 |subheader2={{{subheader2}}}<br/>...... |image|caption |image1|caption1 |image2|caption2={{{caption2}}}<br/>...... |header1=<div style="border-top:1px dashed #ccc;">{{{header1}}}<br/>{{nobold|( ''or'' )}}</div> |label2={{{label1}}} |data2={{{data1}}} |data3=( ''or'' ) |data4=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data1}}}</div> |header5={{{header2}}}<br/><div style="padding:0.75em 0 0.5em;">{{nobold|( ''or'' )}}</div> |label6={{{label2}}} |data6={{{data2}}} |data7=( ''or'' ) |data8=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data2}}}</div> |data9=<div style="padding:0.75em 0 0.5em;">( ''etc'' )</div> |below }} This template is intended as a meta template: a template used for constructing other templates. '''Note''': In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. [[Help:Infobox]] contains an introduction about the recommended content and design of infoboxes; [[Wikipedia:Manual of Style/Infoboxes]] contains additional style guidelines. See [[WP:List of infoboxes]] and [[:Category:Infobox templates]] for lists of prepared topic-specific infoboxes. == Usage == {{tlf|Infobox}} is a meta-template: used to organise an actual <nowiki>{{Infobox sometopic}}</nowiki> template (like {{tl|Infobox building}}). For <code><nowiki>[[Template:Infobox sometopic]]</nowiki></code>, template code then looks like this, simplified: <syntaxhighlight lang="wikitext"> {{Infobox | name = {{{name|{{PAGENAME}}}}} | image = {{{image|}}} | caption1 = {{{caption|}}} | label1 = Former names | data1 = {{{former_names|}}} | header2 = General information | label3 = Status | data3 = {{{status|}}} ... <!-- etc. --> }} </syntaxhighlight> == Optional control parameters == ; name : If this parameter is present, "view/talk/edit" links will be added to the bottom of the infobox pointing to the named page, prefixed by <code>Template:</code> if no namespace is specified. You may use the value <nowiki>{{subst:PAGENAME}}</nowiki>; however, this is rarely what you want because it will send users clicking these links in an infobox to the template code rather than the data in the infobox they probably want to change. ; child : See the [[#Embedding|Embedding]] section for details. If this is set to "yes", this child infobox should be titled but have no name parameter. This parameter is empty by default, set it to "yes" to activate it. ; subbox : See the [[#Subboxes|Subboxes]] section for details. If this is set to "yes", this subbox should be titled but have no name parameter. This parameter is empty by default, set to "yes" to activate it. It has no effect if the '''child''' parameter is also set to "yes". ; decat : If this is set to "yes", the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to "yes" to activate it. ; autoheaders: If this is set to any non-blank value, headers which are not followed by data fields are suppressed. See the "[[#Hiding headers when all its data fields are empty|hiding headers when all its data fields are empty]]" section for more details. == Content parameters == === Title === There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts it as a caption on top of the table. You can use them both together, or just one or the other, or neither (though this is not recommended): ; title : Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For [[Wikipedia:Manual of Style/Accessibility#Tables|accessibility reasons]], this is the most recommended alternative. ; above : Text to put within the uppermost cell of the table. ; subheader(n) : additional title fields which fit below {{{title}}} and {{{above}}}, but before images. Examples: {{Infobox | name = Infobox/doc | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }} </syntaxhighlight>{{clear}} {{Infobox | name = Infobox/doc | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }} </syntaxhighlight>{{clear}} === Illustration images === ; image(n) : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default. See [[WP:ALT]] for more on alt text. ; caption(n) : Text to put underneath the images. === Main data === ; header(n) : Text to use as a header in row n. ; label(n) : Text to use as a label in row n. ; data(n) : Text to display as data in row n. Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a {{para|header''(n)''}} will cause the corresponding {{para|data''(n)''}} (and {{para|rowclass''(n)''}} {{para|label''(n)''}}, see below) to be ignored; the absence of a {{para|data''(n)''}} will cause the corresponding {{para|label''(n)''}} to be ignored. Valid combinations for any single row are: * {{para|class''(n)''}} {{para|header''(n)''}} * {{para|rowclass''(n)''}} {{para|class''(n)''}} {{para|data''(n)''}} * {{para|rowclass''(n)''}} {{para|label''(n)''}} {{para|class''(n)''}} {{para|data''(n)''}} See the rendering of header4, label4, and data4 in the [[#Examples|Examples]] section below. ==== Number ranges ==== To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example: <syntaxhighlight lang="wikitext" style="overflow:auto"> | header3 = Section 1 | label5 = Label A | data5 = Data A | label7 = Label C | data7 = Data C | header10 = Section 2 | label12 = Label D | data12 = Data D </syntaxhighlight>{{clear}} It is also possible to automatically renumber parameter names by using [[User:Frietjes/infoboxgap.js]] or [[Module:IncrementParams]]. There is no upper limit on numbers but there must be at most 50 between each used number. ==== Making data fields optional ==== A row with a label but no data is not displayed. This allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so: <syntaxhighlight lang="wikitext" style="overflow:auto"> | label5 = Population | data5 = {{{population|}}} </syntaxhighlight>{{clear}} This way if an article doesn't define the population parameter in its infobox the row won't be displayed. For more complex fields with pre-formatted contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. For instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'": <syntaxhighlight lang="wikitext" style="overflow:auto"> | label6 = Mass | data6 = {{ #if: {{{mass|}}} | {{{mass}}} kg }} </syntaxhighlight>{{clear}} For more on #if, see [[meta:ParserFunctions##if:|here]]. ==== Hiding headers when all its data fields are empty ==== You can also make headers automatically hide when their section is empty (has no data-row showing). Consider this situation: {{Infobox | title = Example: header with & without data | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} </syntaxhighlight>{{clear}} If you want hide the header when no {{para|data''N''}} values are present, use '''{{para|autoheaders|y}}''': {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} </syntaxhighlight>{{clear}} So, header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no empty row appears before the next visible content. Note: if the data has empty css elements, like {{para|data|2=&lt;span style="background:yellow;">&lt;/span>}}, this will be treated as non-empty (having data). If {{para|autoheaders|y}} but there are items that you ''do not'' want to trigger a header, place {{para|headerX|_BLANK_}}. This will serve as an empty header and separate it from the subsequent items. {{Infobox | title = Example: blank header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = _BLANK_ | label6 = label6 text | data6 = Some value, but does not trigger header1 or show header5 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = _BLANK_ | label6 = label6 text | data6 = Some value, but does not trigger header1 or show header5 }} </syntaxhighlight>{{clear}} === Footer === ; below : Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information. == Presentation parameters == === Italic titles === Titles of articles with infoboxes may be made italic, in line with [[WP:ITALICTITLE]], by passing the <code>italic title</code> parameter. * Turn on italic titles by passing {{para|italic title|<nowiki>{{{italic title|}}}</nowiki>}} from the infobox. * Turn off by default (notably because only Latin script may be safely rendered in this style and italic may be needed to distinguish foreign language from local English language only in that script, but would be difficult to read for other scripts) but allow some instances to be made italic by passing {{para|italic title|<nowiki>{{{italic title|no}}}</nowiki>}} * Do not make any titles italic by not passing the parameter at all. === CSS styling === {{div col}} ; bodystyle : Applies to the infobox table as a whole ; titlestyle : Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered "outside" the infobox. ; abovestyle : Applies only to the "above" cell at the top. The default style has font-size:125%; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:100%;" in the abovestyle. ; imagestyle : Applies to the cell the image is in. This includes the text of the image caption, but you should set text properties with captionstyle instead of imagestyle in case the caption is moved out of this cell in the future. ; captionstyle : Applies to the text of the image caption. ; rowstyle(n) : This parameter is inserted into the <code>style</code> attribute for the specified row. ; headerstyle : Applies to all header cells ; subheaderstyle : Applies to all subheader cells ; labelstyle : Applies to all label cells ; datastyle : Applies to all data cells ; belowstyle : Applies only to the below cell {{div col end}} === HTML classes and microformats === {{div col}} ; bodyclass : This parameter is inserted into the <code>class</code> attribute for the infobox as a whole. ; titleclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''title''' caption. <!-- currently not implemented in Lua module ; aboverowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''above''' cell is on. --> ; aboveclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''above''' cell. ; subheaderrowclass(n) : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''subheader''' is on. ; subheaderclass(n) : This parameter is inserted into the <code>class</code> attribute for the infobox's '''subheader'''. ; imagerowclass(n) : These parameters are inserted into the <code>class</code> attribute for the complete table row their respective '''image''' is on. ; imageclass : This parameter is inserted into the <code>class</code> attribute for the '''image'''. ; rowclass(n) : This parameter is inserted into the <code>class</code> attribute for the specified row including the '''label''' and '''data''' cells. ; class(n) : This parameter is inserted into the <code>class</code> attribute for the '''data''' cell of the specified row. If there's no '''data''' cell it has no effect. <!-- currently not implemented in Lua module ; belowrowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''below''' cell is on. --> ; belowclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''below''' cell. {{div col end}} This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. Multiple class names may be specified, separated by spaces, some of them being used as selectors for custom styling according to a project policy or to the skin selected in user preferences, others being used for microformats. To flag an infobox as containing [[hCard]] information, for example, add the following parameter: <syntaxhighlight lang="wikitext" style="overflow:auto"> | bodyclass = vcard </syntaxhighlight>{{clear}} And for each row containing a data cell that's part of the vcard, add a corresponding class parameter: <syntaxhighlight lang="wikitext" style="overflow:auto"> | class1 = fn | class2 = org | class3 = tel </syntaxhighlight>{{clear}} ...and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox. See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [[microformat]] for more information on microformats in general. == Examples == Notice how the row doesn't appear in the displayed infobox when a '''label''' is defined without an accompanying '''data''' cell, and how all of them are displayed when a '''header''' is defined on the same row as a '''data''' cell. Also notice that '''subheaders''' are not bold by default like the '''headers''' used to split the main data section, because this role is meant to be for the '''above''' cell : {{Suppress categories| {{Infobox |name = Infobox/doc |bodystyle = |titlestyle = |abovestyle = background:#cfc; |subheaderstyle = |title = Test Infobox |above = Above text |subheader = Subheader above image |subheader2 = Second subheader |imagestyle = |captionstyle = |image = [[File:Example-serious.jpg|200px|alt=Example alt text]] |caption = Caption displayed below File:Example-serious.jpg |headerstyle = background:#ccf; |labelstyle = background:#ddf; |datastyle = |header1 = Header defined alone | label1 = | data1 = |header2 = | label2 = Label defined alone does not display (needs data, or is suppressed) | data2 = |header3 = | label3 = | data3 = Data defined alone |header4 = All three defined (header, label, data, all with same number) | label4 = does not display (same number as a header) | data4 = does not display (same number as a header) |header5 = | label5 = Label and data defined (label) | data5 = Label and data defined (data) |belowstyle = background:#ddf; |below = Below text }} }} <syntaxhighlight lang="wikitext"> {{Infobox |name = Infobox/doc |bodystyle = |titlestyle = |abovestyle = background:#cfc; |subheaderstyle = |title = Test Infobox |above = Above text |subheader = Subheader above image |subheader2 = Second subheader |imagestyle = |captionstyle = |image = [[File:Example-serious.jpg|200px|alt=Example alt text]] |caption = Caption displayed below File:Example-serious.jpg |headerstyle = background:#ccf; |labelstyle = background:#ddf; |datastyle = |header1 = Header defined alone | label1 = | data1 = |header2 = | label2 = Label defined alone does not display (needs data, or is suppressed) | data2 = |header3 = | label3 = | data3 = Data defined alone |header4 = All three defined (header, label, data, all with same number) | label4 = does not display (same number as a header) | data4 = does not display (same number as a header) |header5 = | label5 = Label and data defined (label) | data5 = Label and data defined (data) |belowstyle = background:#ddf; |below = Below text }} </syntaxhighlight> For this example, the {{para|bodystyle}} and {{para|labelstyle}} parameters are used to adjust the infobox width and define a default width for the column of labels: {{Infobox |name = Infobox/doc |bodystyle = width:20em |titlestyle = |title = Test Infobox |headerstyle = |labelstyle = width:33% |datastyle = |header1 = | label1 = Label 1 | data1 = Data 1 |header2 = | label2 = Label 2 | data2 = Data 2 |header3 = | label3 = Label 3 | data3 = Data 3 |header4 = Header 4 | label4 = | data4 = |header5 = | label5 = Label 5 | data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |belowstyle = |below = Below text }} <syntaxhighlight lang="wikitext"> {{Infobox |name = Infobox/doc |bodystyle = width:20em |titlestyle = |title = Test Infobox |headerstyle = |labelstyle = width:33% |datastyle = |header1 = | label1 = Label 1 | data1 = Data 1 |header2 = | label2 = Label 2 | data2 = Data 2 |header3 = | label3 = Label 3 | data3 = Data 3 |header4 = Header 4 | label4 = | data4 = |header5 = | label5 = Label 5 | data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |belowstyle = |below = Below text }} </syntaxhighlight> == Embedding == <!--Linked from [[Template:Subinfobox bodystyle/doc]]--> One infobox template can be embedded into another using the {{para|child}} parameter. This feature can be used to create a modular infobox, or to create better-defined logical sections. Long ago, it was necessary to use embedding in order to create infoboxes with more than 99 rows; but nowadays there's no limit to the number of rows that can be defined in a single instance of <code><nowiki>{{infobox}}</nowiki></code>. {{Infobox | title = Top level title | data1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | data2 = {{Infobox | decat = yes | child = yes |title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | data1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | data2 = {{Infobox | decat = yes | child = yes |title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} Note, in the examples above, the child infobox is placed in a <code>data</code> field, not a <code>header</code> field. Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a '''header''' field (but not in a '''label''' field because it would not be displayed!), either using {{Infobox | title = Top level title | header1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | header2 = {{Infobox | decat = yes | child = yes | title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | header1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | header2 = {{Infobox | decat = yes | child = yes | title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} or, {{Infobox | title = Top level title | header1 = First subsection {{Infobox | decat = yes | child = yes | label1 = Label 1.1 | data1 = Data 1.1 }} | header2 = Second subsection {{Infobox | decat = yes | child = yes | label1 = Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | header1 = First subsection {{Infobox | decat = yes | child = yes | label1 = Label 1.1 | data1 = Data 1.1 }} | header2 = Second subsection {{Infobox | decat = yes | child = yes | label1 = Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} Note that omitting the {{para|title}} parameter, and not including any text preceding the embedded infobox, may result in spurious blank table rows, creating gaps in the visual presentation. The garbage output can be suppressed using {{para|rowstyleN|display: none}}, replacing N with the data/header number. [[Wikipedia:WikiProject Infoboxes/embed]] includes some links to Wikipedia articles which include infoboxes embedded within other infoboxes. == Subboxes == An alternative method for embedding is to use {{para|subbox|yes}}, which removes the outer border from the infobox, but preserves the interior structure. One feature of this approach is that the parent and child boxes need not have the same structure, and the label and data fields are not aligned between the parent and child boxes because they are not in the same parent table. {{Infobox | headerstyle = background-color:#eee; | labelstyle = background-color:#eee; | header1 = Main 1 | header2 = Main 2 | data3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | data4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | label5 = Label 5 | data5 = Data 5 | header6 = Main 6 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | headerstyle = background-color:#eee; | labelstyle = background-color:#eee; | header1 = Main 1 | header2 = Main 2 | data3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | data4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | label5 = Label 5 | data5 = Data 5 | header6 = Main 6 }} </syntaxhighlight>{{clear}} Similar embedding techniques may be used within content parameters of some other templates generating tables (such as [[:Template:Sidebar|Sidebar]]) : {{Sidebar | navbar = off | headingstyle = background-color:#eee; | heading1 = Heading 1 | heading2 = Heading 2 | content3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | content4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | heading5 = Heading 5 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Sidebar | navbar = off | headingstyle = background-color:#eee; | heading1 = Heading 1 | heading2 = Heading 2 | content3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | content4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | heading5 = Heading 5 }} </syntaxhighlight>{{clear}} Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's a higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes. == Controlling line-breaking in embedded bulletless lists == Template {{tlx|nbsp}} may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists embedded in infoboxes (e.g. cast list in {{tlx|Infobox film}}), to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details. == Full blank syntax == (Note: there is no limit to the number of possible rows; only 20 are given below since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.) <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | child = {{{child|}}} | subbox = {{{subbox|}}} | italic title = {{{italic title|no}}} | templatestyles = | child templatestyles = | grandchild templatestyles = | bodystyle = | titlestyle = | abovestyle = | subheaderstyle = | title = | above = | subheader = | imagestyle = | captionstyle = | image = | caption = | image2 = | caption2 = | headerstyle = | labelstyle = | datastyle = | header1 = | label1 = | data1 = | header2 = | label2 = | data2 = | header3 = | label3 = | data3 = | header4 = | label4 = | data4 = | header5 = | label5 = | data5 = | header6 = | label6 = | data6 = | header7 = | label7 = | data7 = | header8 = | label8 = | data8 = | header9 = | label9 = | data9 = | header10 = | label10 = | data10 = | header11 = | label11 = | data11 = | header12 = | label12 = | data12 = | header13 = | label13 = | data13 = | header14 = | label14 = | data14 = | header15 = | label15 = | data15 = | header16 = | label16 = | data16 = | header17 = | label17 = | data17 = | header18 = | label18 = | data18 = | header19 = | label19 = | data19 = | header20 = | label20 = | data20 = | belowstyle = | below = }} </syntaxhighlight>{{clear}} {{Help:Infobox/user style}} == Porting to other MediaWikis == The infobox template requires the [[:mw:Extension:Scribunto|Scribunto]] and [[:mw:Extension:TemplateStyles|TemplateStyles]] extensions. [[Wikipedia:WikiProject Transwiki|WikiProject Transwiki]] has a version of this template that has been modified to work on other MediaWikis. == TemplateData == {{TemplateData header}} <templatedata> { "description": "This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.", "format": "{{_\n| ________________ = _\n}}\n", "params": { "title": { "label": "Title", "description": "Title displayed above the infobox", "type": "string", "suggested": true }, "image": { "label": "Image", "description": "Image illustrating the topic. Use full image syntax.", "type": "content", "suggested": true, "example": "[[File:example.png|200px|alt=Example alt text]]" }, "caption": { "label": "Caption", "description": "caption for the image", "type": "content", "suggested": true } }, "paramOrder": [ "title", "image", "caption" ] } </templatedata> ==Tracking categories== * {{Category link with count|Articles with missing Wikidata information}} * {{Category link with count|Articles using infobox templates with no data rows}} * {{Category link with count|Pages using embedded infobox templates with the title parameter}} ==See also== * [[Module:Infobox]], the [[WP:LUA|Lua]] module on which this template is based * [[Module:Check for unknown parameters]] * {{tl|Infobox3cols}} * {{tl|Navbox}} and {{tl|Sidebar}} * [[Wikipedia:List of infoboxes|List of infoboxes]] * [[:Module:InfoboxImage]] <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Infobox templates| ]] [[Category:Wikipedia metatemplates|Infobox]] [[Category:Templates generating microformats]] [[Category:Templates that add a tracking category]] [[Category:Templates based on the Infobox Lua module]] }}</includeonly> b7ba187ea76ee960bbe295ad01c44c646eaedadb Help:Infobox/user style 12 71 140 139 2024-02-06T23:45:13Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Help:Infobox/user_style]]: w wikitext text/x-wiki {{{heading| ==Infoboxes and user style == }}} Users can have [[WP:User style|user CSS]] that hides<!--, moves, or makes collapsible--> any infoboxes in their own browsers. To hide all infoboxes, add the following to [[Special:MyPage/common.css]] (for all [[WP:Skin|skins]], or [[Special:MyPage/skin.css]] for just the current skin), on a line by itself: <syntaxhighlight lang="css">div.mw-parser-output .infobox { display: none; }</syntaxhighlight> Alternatively, you can add the following code to [[Special:MyPage/common.js|your common.js]] or into a browser user script that is executed by an extension like [[Greasemonkey]]: <syntaxhighlight lang="js">$('.infobox').hide();</syntaxhighlight> Be aware that although{{#if:{{{guideline|}}}||, per [[WP:Manual of Style/Infoboxes]],}} all information in an infobox ideally should also be found in the main body of an article, there isn't perfect compliance with this guideline. For example, the full taxonomic hierarchy in {{tlx|Taxobox}}, and the OMIM and other medical database codes of {{tlx|Infobox disease}} are often not found in the main article content. The infobox is also often the location of the most significant, even only, image in an article. There is a userscript which removes infoboxes but moves the images contained to separate thumbnails: [[User:Maddy from Celeste/disinfobox.js]].<!-- Needs Special:Mypage/common.js options for: * Making infoboxes collapsible ** Making them auto-collapsed * Moving infoboxes to bottom of page --><noinclude> {{Documentation|content= This documentation snippet is transcluded at [[Help:Infobox]], [[Template:Infobox/doc]], [[WP:Customisation#Hiding specific messages]], [[Help:User style]], [[WP:Manual of Style/Infoboxes]], and other places where this information is relevant. As a template, this snippet takes a {{para|heading}} parameter to replace the level-2 <code>==Infoboxes and user style==</code> section heading code, as needed. E.g., for a <code>=== ... ===</code> level-3 heading: <code><nowiki>heading={{=}}{{=}}{{=}}Infoboxes and user style{{=}}{{=}}{{=}}</nowiki></code> }} </noinclude> ba4dac68eb2bdc49a32f2a11b9afd52381bf06b5 Module:Message box/ombox.css 828 72 142 141 2024-02-06T23:45:13Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Message_box/ombox.css]]: w text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Template:Hlist/styles.css 10 73 144 143 2024-02-06T23:45:14Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Hlist/styles.css]]: w text text/plain /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Template:Infobox 10 4 146 6 2024-02-06T23:50:36Z Otonashi Ayana 2 1 revision imported from [[:meta:Template:Infobox]]: w wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Module:Yesno 828 5 148 8 2024-02-06T23:50:37Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Yesno]]: w Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:Arguments 828 6 150 10 2024-02-06T23:50:37Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Arguments]]: w Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Template translation 828 74 152 151 2024-02-06T23:50:37Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Template_translation]]: w Scribunto text/plain local this = {} function this.checkLanguage(subpage, default) --[[Check first if there's an any invalid character that would cause the mw.language.isKnownLanguageTag function() to throw an exception: - all ASCII controls in [\000-\031\127], - double quote ("), sharp sign (#), ampersand (&), apostrophe ('), - slash (/), colon (:), semicolon (;), lower than (<), greater than (>), - brackets and braces ([, ], {, }), pipe (|), backslash (\\) All other characters are accepted, including space and all non-ASCII characters (including \192, which is invalid in UTF-8). --]] if mw.language.isValidCode(subpage) and mw.language.isKnownLanguageTag(subpage) --[[However "SupportedLanguages" are too restrictive, as they discard many valid BCP47 script variants (only because MediaWiki still does not define automatic transliterators for them, e.g. "en-dsrt" or "fr-brai" for French transliteration in Braille), and country variants, (useful in localized data, even if they are no longer used for translations, such as zh-cn, also useful for legacy codes). We want to avoid matching subpagenames containing any uppercase letter, (even if they are considered valid in BCP 47, in which they are case-insensitive; they are not "SupportedLanguages" for MediaWiki, so they are not "KnownLanguageTags" for MediaWiki). To be more restrictive, we exclude tags * for specific uses in template subpages and unusable as language tags; * that is not ASCII and not a lowercase letter, minus-hyphen, or digit, or does not start by a letter or does not finish by a letter or digit; * or that has subtags with more than 8 characters between hyphens; * or that has two hyphens. --]] or subpage ~= "doc" and subpage ~= "layout" and subpage ~= "button" and subpage ~= "buttons" and subpage ~= "sandbox" and subpage ~= "testcase" and subpage ~= "testcases" and string.find(subpage, "^[%l][%-%d%l]*[%d%l]$") ~= nil and string.find(subpage, "[%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l]") == nil and string.find(subpage, "%-%-") == nil then return subpage end -- Otherwise there's currently no known language subpage return default end --[[Get the last subpage of an arbitrary page if it is a translation. To be used from templates. ]] function this.getLanguageSubpage(frame) local title = frame and frame.args[1] if not title or title == '' then title = mw.title.getCurrentTitle() end return this._getLanguageSubpage(title) end --[[Get the last subpage of an arbitrary page if it is a translation. To be used from Lua. ]] function this._getLanguageSubpage(title) if type(title) == 'string' then title = mw.title.new(title) end if not title then -- invalid title return nil end --[[This code does not work in all namespaces where the Translate tool works. -- It works in the main namespace on Meta because it allows subpages there -- It would not work in the main namespace of English Wikipedia (but the -- articles are monolignual on that wiki). -- On Meta-Wiki the main space uses subpages and its pages are translated. -- The Translate tool allows translatng pages in all namespaces, even if -- the namespace officially does not have subpages. -- On Meta-Wiki the Category namespace still does not have subpages enabled, -- even if they would be very useful for categorizing templates, that DO have -- subpages (for documentatio and tstboxes pages). This is a misconfiguration -- bug of Meta-Wiki. The work-around is to split the full title and then -- get the last titlepart. local subpage = title.subpageText --]] local titleparts = mw.text.split(title.fullText, '/') local subpage = titleparts[#titleparts] return this.checkLanguage(subpage, '') end --[[Get the last subpage of the current page if it is a translation. ]] function this.getCurrentLanguageSubpage() return this._getLanguageSubpage(mw.title.getCurrentTitle()) end --[[Get the first part of the language code of the subpage, before the '-'. --]] function this.getMainLanguageSubpage() parts = mw.text.split(this.getCurrentLanguageSubpage(), '-') return parts[1] end --[[Get the last subpage of the current frame if it is a translation. Not used locally. --]] function this.getFrameLanguageSubpage(frame) return this._getLanguageSubpage(frame:getParent():getTitle()) end --[[Get the language of the current page. Not used locally. --]] function this.getLanguage() local subpage = mw.title.getCurrentTitle().subpageText return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode()) end --[[Get the language of the current frame. Not used locally. --]] function this.getFrameLanguage(frame) local titleparts = mw.text.split(frame:getParent():getTitle(), '/') local subpage = titleparts[#titleparts] return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode()) end function this.title(namespace, basepagename, subpage) local message, title local pagename = basepagename if (subpage or '') ~= '' then pagename = pagename .. '/' .. subpage end local valid, title = xpcall(function() return mw.title.new(pagename, namespace) -- costly end, function(msg) -- catch undocumented exception (!?) -- thrown when namespace does not exist. The doc still -- says it should return a title, even in that case... message = msg end) if valid and title ~= nil and (title.id or 0) ~= 0 then return title end return { -- "pseudo" mw.title object with id = nil in case of error prefixedText = pagename, -- the only property we need below message = message -- only for debugging } end --[[If on a translation subpage (like Foobar/de), this function returns a given template in the same language, if the translation is available. Otherwise, the template is returned in its default language, without modification. This is aimed at replacing the current implementation of Template:TNTN. This version does not expand the returned template name: this solves the problem of self-recursion in TNT when translatable templates need themselves to transclude other translable templates (such as Tnavbar). --]] function this.getTranslatedTemplate(frame, withStatus) local args = frame.args local pagename = args['template'] --[[Check whether the pagename is actually in the Template namespace, or if we're transcluding a main-namespace page. (added for backward compatibility of Template:TNT) ]] local namespace, title = args['tntns'] or '' if namespace ~= '' then -- Checks for tntns parameter for custom ns. title = this.title(namespace, pagename) -- Costly else -- Supposes that set page is in ns10. namespace = 'Template' title = this.title(namespace, pagename) -- Costly if title.id == nil then -- not found in the Template namespace, assume the main namespace (for backward compatibility) namespace = '' title = this.title(namespace, pagename) -- Costly end end -- Get the last subpage and check if it matches a known language code. local subpage = args['uselang'] or '' if subpage == '' then subpage = this.getCurrentLanguageSubpage() end if subpage == '' then -- Check if a translation of the pagename exists in English local newtitle = this.title(namespace, pagename, 'en') -- Costly -- Use the translation when it exists if newtitle.id ~= nil then title = newtitle end else -- Check if a translation of the pagename exists in that language local newtitle = this.title(namespace, pagename, subpage) -- Costly if newtitle.id == nil then -- Check if a translation of the pagename exists in English newtitle = this.title(namespace, pagename, 'en') -- Costly end -- Use the translation when it exists if newtitle.id ~= nil then title = newtitle end end -- At this point the title should exist if withStatus then -- status returned to Lua function below return title.prefixedText, title.id ~= nil else -- returned directly to MediaWiki return title.prefixedText end end --[[If on a translation subpage (like Foobar/de), this function renders a given template in the same language, if the translation is available. Otherwise, the template is rendered in its default language, without modification. This is aimed at replacing the current implementation of Template:TNT. Note that translatable templates cannot transclude themselves other translatable templates, as it will recurse on TNT. Use TNTN instead to return only the effective template name to expand externally, with template parameters also provided externally. --]] function this.renderTranslatedTemplate(frame) local title, found = this.getTranslatedTemplate(frame, true) -- At this point the title should exist prior to performing the expansion -- of the template, otherwise render a red link to the missing page -- (resolved in its assumed namespace). If we don't tet this here, a -- script error would be thrown. Returning a red link is consistant with -- MediaWiki behavior when attempting to transclude inexistant templates. if not found then return '[[' .. title .. ']]' end -- Copy args pseudo-table to a proper table so we can feed it to expandTemplate. -- Then render the pagename. local args = frame.args local pargs = (frame:getParent() or {}).args local arguments = {} if (args['noshift'] or '') == '' then for k, v in pairs(pargs) do local n = tonumber(k) or 0 if n <= 0 then -- unnumbered args arguments[k] = v elseif n >= 2 then -- numbered args >= 2 need to be shifted arguments[n - 1] = v end end else -- special case where TNT is used as autotranslate -- (don't shift again what is shifted in the invokation) for k, v in pairs(pargs) do arguments[k] = v end end arguments['template'] = title -- override the existing parameter of the base template name supplied with the full name of the actual template expanded arguments['tntns'] = nil -- discard the specified namespace override arguments['uselang'] = args['uselang'] -- argument forwarded into parent frame arguments['noshift'] = args['noshift'] -- argument forwarded into parent frame return frame:expandTemplate{title = ':' .. title, args = arguments} end --[[A helper for mocking TNT in Special:TemplateSandbox. TNT breaks TemplateSandbox; mocking it with this method means templates won't be localized but at least TemplateSandbox substitutions will work properly. Won't work with complex uses. --]] function this.mockTNT(frame) local pargs = (frame:getParent() or {}).args local arguments = {} for k, v in pairs(pargs) do local n = tonumber(k) or 0 if n <= 0 then -- unnumbered args arguments[k] = v elseif n >= 2 then -- numbered args >= 2 need to be shifted arguments[n - 1] = v end end if not pargs[1] then return '' end return frame:expandTemplate{title = 'Template:' .. pargs[1], args = arguments} end return this 5d6ccce18a15ce0078fd1918b6afeb5b443f37ee Module:Message box 828 9 154 16 2024-02-06T23:50:38Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Message_box]]: w Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) f2fb84f7b817d2d88747f57c40902a0d8be8158a Module:No globals 828 75 156 155 2024-02-06T23:50:38Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:No_globals]]: w Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then -- perf optimization here and below: do not load Module:TNT unless there is an error error(require('Module:TNT').format('I18n/No globals', 'err-read', tostring(k)), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error(require('Module:TNT').format('I18n/No globals', 'err-write', tostring(k)), 2) end rawset(t, k, v) end setmetatable(_G, mt) efcb47c74e7e2bb9a4ad8764d99a0afce8fed410 Module:Message box/configuration 828 10 158 18 2024-02-06T23:50:39Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Message_box/configuration]]: w Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } ccb6bdf2868087b6833d203307f2f6a92b3b0a01 Module:TableTools 828 20 160 38 2024-02-06T23:50:39Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:TableTools]]: w Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Module:Infobox 828 17 162 32 2024-02-06T23:50:39Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Infobox]]: w Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:Navbar 828 36 164 70 2024-02-06T23:50:40Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Navbar]]: w Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = 'Special:EditPage/' .. title.fullText, ['url'] = false }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = 'Special:PageHistory/' .. title.fullText, ['url'] = false }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 047f307758c878eb3e99ed1768cc40920a6ec5fa Module:Navbar/configuration 828 37 166 72 2024-02-06T23:50:40Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Navbar/configuration]]: w Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Infobox/styles.css 828 18 168 34 2024-02-06T23:50:40Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Infobox/styles.css]]: w text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:TNT 828 76 176 175 2024-02-06T23:50:42Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:TNT]]: w Scribunto text/plain -- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT -- Please do not modify it anywhere else, as it may get copied and override your changes. -- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT -- -- DESCRIPTION: -- The "msg" function uses a Commons dataset to translate a message -- with a given key (e.g. source-table), plus optional arguments -- to the wiki markup in the current content language. -- Use lang=xx to set language. Example: -- -- {{#invoke:TNT | msg -- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --> -- | source-table <!-- uses a translation message with id = "source-table" --> -- | param1 }} <!-- optional parameter --> -- -- -- The "doc" function will generate the <templatedata> parameter documentation for templates. -- This way all template parameters can be stored and localized in a single Commons dataset. -- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons. -- -- {{#invoke:TNT | doc | Graph:Lines }} -- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab -- if the current page is Template:Graph:Lines/doc -- local p = {} local i18nDataset = 'I18n/Module:TNT.tab' -- Forward declaration of the local functions local sanitizeDataset, loadData, link, formatMessage function p.msg(frame) local dataset, id local params = {} local lang = nil for k, v in pairs(frame.args) do if k == 1 then dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then params[k - 2] = mw.text.trim(v) elseif k == 'lang' and v ~= '_' then lang = mw.text.trim(v) end end return formatMessage(dataset, id, params, lang) end -- Identical to p.msg() above, but used from other lua modules -- Parameters: name of dataset, message key, optional arguments -- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.format(dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('format', 1, dataset, 'string') checkType('format', 2, key, 'string') return formatMessage(dataset, key, {...}) end -- Identical to p.msg() above, but used from other lua modules with the language param -- Parameters: language code, name of dataset, message key, optional arguments -- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.formatInLanguage(lang, dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('formatInLanguage', 1, lang, 'string') checkType('formatInLanguage', 2, dataset, 'string') checkType('formatInLanguage', 3, key, 'string') return formatMessage(dataset, key, {...}, lang) end -- Obsolete function that adds a 'c:' prefix to the first param. -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' function p.link(frame) return link(frame.args[1]) end function p.doc(frame) local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1]) return frame:extensionTag('templatedata', p.getTemplateData(dataset)) .. formatMessage(i18nDataset, 'edit_doc', {link(dataset)}) end function p.getTemplateData(dataset) -- TODO: add '_' parameter once lua starts reindexing properly for "all" languages local data = loadData(dataset) local names = {} for _, field in ipairs(data.schema.fields) do table.insert(names, field.name) end local params = {} local paramOrder = {} for _, row in ipairs(data.data) do local newVal = {} local name = nil for pos, columnName in ipairs(names) do if columnName == 'name' then name = row[pos] else newVal[columnName] = row[pos] end end if name then params[name] = newVal table.insert(paramOrder, name) end end -- Work around json encoding treating {"1":{...}} as an [{...}] params['zzz123']='' local json = mw.text.jsonEncode({ params=params, paramOrder=paramOrder, description=data.description }) json = string.gsub(json,'"zzz123":"",?', "") return json end -- Local functions sanitizeDataset = function(dataset) if not dataset then return nil end dataset = mw.text.trim(dataset) if dataset == '' then return nil elseif string.sub(dataset,-4) ~= '.tab' then return dataset .. '.tab' else return dataset end end loadData = function(dataset, lang) dataset = sanitizeDataset(dataset) if not dataset then error(formatMessage(i18nDataset, 'error_no_dataset', {})) end -- Give helpful error to thirdparties who try and copy this module. if not mw.ext or not mw.ext.data or not mw.ext.data.get then error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset) end local data = mw.ext.data.get(dataset, lang) if data == false then if dataset == i18nDataset then -- Prevent cyclical calls error('Missing Commons dataset ' .. i18nDataset) else error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)})) end end return data end -- Given a dataset name, convert it to a title with the 'commons:data:' prefix link = function(dataset) return 'c:Data:' .. mw.text.trim(dataset or '') end formatMessage = function(dataset, key, params, lang) for _, row in pairs(loadData(dataset, lang).data) do local id, msg = unpack(row) if id == key then local result = mw.message.newRawMessage(msg, unpack(params or {})) return result:plain() end end if dataset == i18nDataset then -- Prevent cyclical calls error('Invalid message key "' .. key .. '"') else error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)})) end end return p 2c570369c78089aef29c72768918373f61b7075d Module:Documentation/i18n 828 77 178 177 2024-02-06T23:50:42Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Documentation/i18n]]: w Scribunto text/plain local format = require('Module:TNT').format local i18n = {} i18n['cfg-error-msg-type'] = format('I18n/Documentation', 'cfg-error-msg-type') i18n['cfg-error-msg-empty'] = format('I18n/Documentation', 'cfg-error-msg-empty') -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. i18n['template-namespace-heading'] = format('I18n/Documentation', 'template-namespace-heading') -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. i18n['module-namespace-heading'] = format('I18n/Documentation', 'module-namespace-heading') -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. i18n['file-namespace-heading'] = format('I18n/Documentation', 'file-namespace-heading') -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. i18n['other-namespaces-heading'] = format('I18n/Documentation', 'other-namespaces-heading') -- cfg['view-link-display'] -- The text to display for "view" links. i18n['view-link-display'] = format('I18n/Documentation', 'view-link-display') -- cfg['edit-link-display'] -- The text to display for "edit" links. i18n['edit-link-display'] = format('I18n/Documentation', 'edit-link-display') -- cfg['history-link-display'] -- The text to display for "history" links. i18n['history-link-display'] = format('I18n/Documentation', 'history-link-display') -- cfg['purge-link-display'] -- The text to display for "purge" links. i18n['purge-link-display'] = format('I18n/Documentation', 'purge-link-display') -- cfg['create-link-display'] -- The text to display for "create" links. i18n['create-link-display'] = format('I18n/Documentation', 'create-link-display') return i18n 9a9f234b177a424f1fc465eb25c484eff54905c0 Template:Documentation subpage 10 54 182 106 2024-02-06T23:50:43Z Otonashi Ayana 2 1 revision imported from [[:meta:Template:Documentation_subpage]]: w wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 41ca90af0945442788a2dbd08c8c54a61a23c057 Template:IsDocSubpage 10 78 184 183 2024-02-06T23:50:43Z Otonashi Ayana 2 1 revision imported from [[:meta:Template:IsDocSubpage]]: w wikitext text/x-wiki <onlyinclude><includeonly>{{#ifexpr: ( {{#ifeq:{{lc:{{SUBPAGENAME}}}}|{{lc:{{{override|doc}}}}}|1|0}} or ( {{#ifeq:{{lc:{{#titleparts:{{FULLPAGENAME}}|-1|-2}}}}|{{lc:{{{override|doc}}}}}|1|0}} and {{#if:{{#invoke:Template translation|getLanguageSubpage}}|1|0}} ) )<!-- -->|{{{true|1}}}<!-- -->|{{{false|}}}<!-- -->}}</includeonly></onlyinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> e60f69b26953d441bf5b76229c9222f16c042ae6 Module:List 828 19 186 36 2024-02-06T23:50:44Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:List]]: w Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Module:Message box/ombox.css 828 72 188 142 2024-02-06T23:50:44Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Message_box/ombox.css]]: w text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 202 188 2024-02-06T23:53:45Z Otonashi Ayana 2 Otonashi Ayana changed the content model of the page [[Module:Message box/ombox.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Module:Lua banner 828 62 190 122 2024-02-06T23:50:44Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Lua_banner]]: w Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Module:Lua banner/config 828 79 192 191 2024-02-06T23:50:45Z Otonashi Ayana 2 1 revision imported from [[:meta:Module:Lua_banner/config]]: w Scribunto text/plain local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpage_blacklist'] = { ['doc'] = true, ['sandbox'] = true, ['sandbox2'] = true, ['testcases'] = true, } -- Allow wishes: whether wishes for conversion to Lua are allowed. -- If true, calls with zero parameters are valid, and considered to be wishes: -- The box’s text is “This template should use Lua”, and cfg['wish_category'] is -- added. If false, such calls are invalid, an error message appears, and -- cfg['error_category'] is added. cfg['allow_wishes'] = false -- Default category: this category is added if the module call contains errors -- (e.g. no module listed). A category name without namespace, or nil -- to disable categorization (not recommended). cfg['error_category'] = 'Lua templates with errors' -- Wish category: this category is added if no module is listed, and wishes are -- allowed. (Not used if wishes are not allowed.) A category name without -- namespace, or nil to disable categorization. cfg['wish_category'] = nil -- Default category: this category is added if none of the below module_categories -- matches the first module listed. A category name without namespace, or nil -- to disable categorization. cfg['default_category'] = 'Lua-based templates' -- Module categories: one of these categories is added if the first listed module -- is the listed module (e.g. {{Lua|Module:String}} adds -- [[Category:Lua String-based templates]].) Format: -- ['<module name>'] = '<category name>' -- where neither <module name> nor <category name> contains namespace. An empty -- table (i.e. no module-based categorization) will suffice on smaller wikis. cfg['module_categories'] = { ['Citation'] = 'Lua-based citation templates', ['Citation/CS1'] = 'Lua-based citation templates', } return cfg -- Don’t touch this line. 96ff2360e00fa7bf1df8fa9bea988789b8a82cab Template:Lua 10 64 194 126 2024-02-06T23:50:45Z Otonashi Ayana 2 1 revision imported from [[:meta:Template:Lua]]: w wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Infobox/doc 10 70 196 138 2024-02-06T23:50:46Z Otonashi Ayana 2 1 revision imported from [[:meta:Template:Infobox/doc]]: w wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{distinguish|Template:Userbox}} {{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}} {{Lua|Module:Infobox}} {{Parameter names example |name={{PAGENAME}} <!--|child |subbox |decat--> |title |above |subheader |subheader1 |subheader2={{{subheader2}}}<br/>...... |image|caption |image1|caption1 |image2|caption2={{{caption2}}}<br/>...... |header1=<div style="border-top:1px dashed #ccc;">{{{header1}}}<br/>{{nobold|( ''or'' )}}</div> |label2={{{label1}}} |data2={{{data1}}} |data3=( ''or'' ) |data4=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data1}}}</div> |header5={{{header2}}}<br/><div style="padding:0.75em 0 0.5em;">{{nobold|( ''or'' )}}</div> |label6={{{label2}}} |data6={{{data2}}} |data7=( ''or'' ) |data8=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data2}}}</div> |data9=<div style="padding:0.75em 0 0.5em;">( ''etc'' )</div> |below }} This template is intended as a meta template: a template used for constructing other templates. '''Note''': In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. [[Help:Infobox]] contains an introduction about the recommended content and design of infoboxes; [[Wikipedia:Manual of Style/Infoboxes]] contains additional style guidelines. See [[WP:List of infoboxes]] and [[:Category:Infobox templates]] for lists of prepared topic-specific infoboxes. == Usage == {{tlf|Infobox}} is a meta-template: used to organise an actual <nowiki>{{Infobox sometopic}}</nowiki> template (like {{tl|Infobox building}}). For <code><nowiki>[[Template:Infobox sometopic]]</nowiki></code>, template code then looks like this, simplified: <syntaxhighlight lang="wikitext"> {{Infobox | name = {{{name|{{PAGENAME}}}}} | image = {{{image|}}} | caption1 = {{{caption|}}} | label1 = Former names | data1 = {{{former_names|}}} | header2 = General information | label3 = Status | data3 = {{{status|}}} ... <!-- etc. --> }} </syntaxhighlight> == Optional control parameters == ; name : If this parameter is present, "view/talk/edit" links will be added to the bottom of the infobox pointing to the named page, prefixed by <code>Template:</code> if no namespace is specified. You may use the value <nowiki>{{subst:PAGENAME}}</nowiki>; however, this is rarely what you want because it will send users clicking these links in an infobox to the template code rather than the data in the infobox they probably want to change. ; child : See the [[#Embedding|Embedding]] section for details. If this is set to "yes", this child infobox should be titled but have no name parameter. This parameter is empty by default, set it to "yes" to activate it. ; subbox : See the [[#Subboxes|Subboxes]] section for details. If this is set to "yes", this subbox should be titled but have no name parameter. This parameter is empty by default, set to "yes" to activate it. It has no effect if the '''child''' parameter is also set to "yes". ; decat : If this is set to "yes", the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to "yes" to activate it. ; autoheaders: If this is set to any non-blank value, headers which are not followed by data fields are suppressed. See the "[[#Hiding headers when all its data fields are empty|hiding headers when all its data fields are empty]]" section for more details. == Content parameters == === Title === There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts it as a caption on top of the table. You can use them both together, or just one or the other, or neither (though this is not recommended): ; title : Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For [[Wikipedia:Manual of Style/Accessibility#Tables|accessibility reasons]], this is the most recommended alternative. ; above : Text to put within the uppermost cell of the table. ; subheader(n) : additional title fields which fit below {{{title}}} and {{{above}}}, but before images. Examples: {{Infobox | name = Infobox/doc | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }} </syntaxhighlight>{{clear}} {{Infobox | name = Infobox/doc | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }} </syntaxhighlight>{{clear}} === Illustration images === ; image(n) : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default. See [[WP:ALT]] for more on alt text. ; caption(n) : Text to put underneath the images. === Main data === ; header(n) : Text to use as a header in row n. ; label(n) : Text to use as a label in row n. ; data(n) : Text to display as data in row n. Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a {{para|header''(n)''}} will cause the corresponding {{para|data''(n)''}} (and {{para|rowclass''(n)''}} {{para|label''(n)''}}, see below) to be ignored; the absence of a {{para|data''(n)''}} will cause the corresponding {{para|label''(n)''}} to be ignored. Valid combinations for any single row are: * {{para|class''(n)''}} {{para|header''(n)''}} * {{para|rowclass''(n)''}} {{para|class''(n)''}} {{para|data''(n)''}} * {{para|rowclass''(n)''}} {{para|label''(n)''}} {{para|class''(n)''}} {{para|data''(n)''}} See the rendering of header4, label4, and data4 in the [[#Examples|Examples]] section below. ==== Number ranges ==== To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example: <syntaxhighlight lang="wikitext" style="overflow:auto"> | header3 = Section 1 | label5 = Label A | data5 = Data A | label7 = Label C | data7 = Data C | header10 = Section 2 | label12 = Label D | data12 = Data D </syntaxhighlight>{{clear}} It is also possible to automatically renumber parameter names by using [[User:Frietjes/infoboxgap.js]] or [[Module:IncrementParams]]. There is no upper limit on numbers but there must be at most 50 between each used number. ==== Making data fields optional ==== A row with a label but no data is not displayed. This allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so: <syntaxhighlight lang="wikitext" style="overflow:auto"> | label5 = Population | data5 = {{{population|}}} </syntaxhighlight>{{clear}} This way if an article doesn't define the population parameter in its infobox the row won't be displayed. For more complex fields with pre-formatted contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. For instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'": <syntaxhighlight lang="wikitext" style="overflow:auto"> | label6 = Mass | data6 = {{ #if: {{{mass|}}} | {{{mass}}} kg }} </syntaxhighlight>{{clear}} For more on #if, see [[meta:ParserFunctions##if:|here]]. ==== Hiding headers when all its data fields are empty ==== You can also make headers automatically hide when their section is empty (has no data-row showing). Consider this situation: {{Infobox | title = Example: header with & without data | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} </syntaxhighlight>{{clear}} If you want hide the header when no {{para|data''N''}} values are present, use '''{{para|autoheaders|y}}''': {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = Header5 with data below | label6 = label6 text | data6 = Some value }} </syntaxhighlight>{{clear}} So, header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no empty row appears before the next visible content. Note: if the data has empty css elements, like {{para|data|2=&lt;span style="background:yellow;">&lt;/span>}}, this will be treated as non-empty (having data). If {{para|autoheaders|y}} but there are items that you ''do not'' want to trigger a header, place {{para|headerX|_BLANK_}}. This will serve as an empty header and separate it from the subsequent items. {{Infobox | title = Example: blank header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = _BLANK_ | label6 = label6 text | data6 = Some value, but does not trigger header1 or show header5 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Example: header with & without data | autoheaders = y | headerstyle = background:lightgrey | header1 = Header1 with empty section | label2 = label2 text | data2 = | label3 = label3 text | data3 = | label4 = label4 text | data4 = | header5 = _BLANK_ | label6 = label6 text | data6 = Some value, but does not trigger header1 or show header5 }} </syntaxhighlight>{{clear}} === Footer === ; below : Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information. == Presentation parameters == === Italic titles === Titles of articles with infoboxes may be made italic, in line with [[WP:ITALICTITLE]], by passing the <code>italic title</code> parameter. * Turn on italic titles by passing {{para|italic title|<nowiki>{{{italic title|}}}</nowiki>}} from the infobox. * Turn off by default (notably because only Latin script may be safely rendered in this style and italic may be needed to distinguish foreign language from local English language only in that script, but would be difficult to read for other scripts) but allow some instances to be made italic by passing {{para|italic title|<nowiki>{{{italic title|no}}}</nowiki>}} * Do not make any titles italic by not passing the parameter at all. === CSS styling === {{div col}} ; bodystyle : Applies to the infobox table as a whole ; titlestyle : Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered "outside" the infobox. ; abovestyle : Applies only to the "above" cell at the top. The default style has font-size:125%; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:100%;" in the abovestyle. ; imagestyle : Applies to the cell the image is in. This includes the text of the image caption, but you should set text properties with captionstyle instead of imagestyle in case the caption is moved out of this cell in the future. ; captionstyle : Applies to the text of the image caption. ; rowstyle(n) : This parameter is inserted into the <code>style</code> attribute for the specified row. ; headerstyle : Applies to all header cells ; subheaderstyle : Applies to all subheader cells ; labelstyle : Applies to all label cells ; datastyle : Applies to all data cells ; belowstyle : Applies only to the below cell {{div col end}} === HTML classes and microformats === {{div col}} ; bodyclass : This parameter is inserted into the <code>class</code> attribute for the infobox as a whole. ; titleclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''title''' caption. <!-- currently not implemented in Lua module ; aboverowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''above''' cell is on. --> ; aboveclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''above''' cell. ; subheaderrowclass(n) : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''subheader''' is on. ; subheaderclass(n) : This parameter is inserted into the <code>class</code> attribute for the infobox's '''subheader'''. ; imagerowclass(n) : These parameters are inserted into the <code>class</code> attribute for the complete table row their respective '''image''' is on. ; imageclass : This parameter is inserted into the <code>class</code> attribute for the '''image'''. ; rowclass(n) : This parameter is inserted into the <code>class</code> attribute for the specified row including the '''label''' and '''data''' cells. ; class(n) : This parameter is inserted into the <code>class</code> attribute for the '''data''' cell of the specified row. If there's no '''data''' cell it has no effect. <!-- currently not implemented in Lua module ; belowrowclass : This parameter is inserted into the <code>class</code> attribute for the complete table row the '''below''' cell is on. --> ; belowclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''below''' cell. {{div col end}} This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. Multiple class names may be specified, separated by spaces, some of them being used as selectors for custom styling according to a project policy or to the skin selected in user preferences, others being used for microformats. To flag an infobox as containing [[hCard]] information, for example, add the following parameter: <syntaxhighlight lang="wikitext" style="overflow:auto"> | bodyclass = vcard </syntaxhighlight>{{clear}} And for each row containing a data cell that's part of the vcard, add a corresponding class parameter: <syntaxhighlight lang="wikitext" style="overflow:auto"> | class1 = fn | class2 = org | class3 = tel </syntaxhighlight>{{clear}} ...and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox. See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [[microformat]] for more information on microformats in general. == Examples == Notice how the row doesn't appear in the displayed infobox when a '''label''' is defined without an accompanying '''data''' cell, and how all of them are displayed when a '''header''' is defined on the same row as a '''data''' cell. Also notice that '''subheaders''' are not bold by default like the '''headers''' used to split the main data section, because this role is meant to be for the '''above''' cell : {{Suppress categories| {{Infobox |name = Infobox/doc |bodystyle = |titlestyle = |abovestyle = background:#cfc; |subheaderstyle = |title = Test Infobox |above = Above text |subheader = Subheader above image |subheader2 = Second subheader |imagestyle = |captionstyle = |image = [[File:Example-serious.jpg|200px|alt=Example alt text]] |caption = Caption displayed below File:Example-serious.jpg |headerstyle = background:#ccf; |labelstyle = background:#ddf; |datastyle = |header1 = Header defined alone | label1 = | data1 = |header2 = | label2 = Label defined alone does not display (needs data, or is suppressed) | data2 = |header3 = | label3 = | data3 = Data defined alone |header4 = All three defined (header, label, data, all with same number) | label4 = does not display (same number as a header) | data4 = does not display (same number as a header) |header5 = | label5 = Label and data defined (label) | data5 = Label and data defined (data) |belowstyle = background:#ddf; |below = Below text }} }} <syntaxhighlight lang="wikitext"> {{Infobox |name = Infobox/doc |bodystyle = |titlestyle = |abovestyle = background:#cfc; |subheaderstyle = |title = Test Infobox |above = Above text |subheader = Subheader above image |subheader2 = Second subheader |imagestyle = |captionstyle = |image = [[File:Example-serious.jpg|200px|alt=Example alt text]] |caption = Caption displayed below File:Example-serious.jpg |headerstyle = background:#ccf; |labelstyle = background:#ddf; |datastyle = |header1 = Header defined alone | label1 = | data1 = |header2 = | label2 = Label defined alone does not display (needs data, or is suppressed) | data2 = |header3 = | label3 = | data3 = Data defined alone |header4 = All three defined (header, label, data, all with same number) | label4 = does not display (same number as a header) | data4 = does not display (same number as a header) |header5 = | label5 = Label and data defined (label) | data5 = Label and data defined (data) |belowstyle = background:#ddf; |below = Below text }} </syntaxhighlight> For this example, the {{para|bodystyle}} and {{para|labelstyle}} parameters are used to adjust the infobox width and define a default width for the column of labels: {{Infobox |name = Infobox/doc |bodystyle = width:20em |titlestyle = |title = Test Infobox |headerstyle = |labelstyle = width:33% |datastyle = |header1 = | label1 = Label 1 | data1 = Data 1 |header2 = | label2 = Label 2 | data2 = Data 2 |header3 = | label3 = Label 3 | data3 = Data 3 |header4 = Header 4 | label4 = | data4 = |header5 = | label5 = Label 5 | data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |belowstyle = |below = Below text }} <syntaxhighlight lang="wikitext"> {{Infobox |name = Infobox/doc |bodystyle = width:20em |titlestyle = |title = Test Infobox |headerstyle = |labelstyle = width:33% |datastyle = |header1 = | label1 = Label 1 | data1 = Data 1 |header2 = | label2 = Label 2 | data2 = Data 2 |header3 = | label3 = Label 3 | data3 = Data 3 |header4 = Header 4 | label4 = | data4 = |header5 = | label5 = Label 5 | data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |belowstyle = |below = Below text }} </syntaxhighlight> == Embedding == <!--Linked from [[Template:Subinfobox bodystyle/doc]]--> One infobox template can be embedded into another using the {{para|child}} parameter. This feature can be used to create a modular infobox, or to create better-defined logical sections. Long ago, it was necessary to use embedding in order to create infoboxes with more than 99 rows; but nowadays there's no limit to the number of rows that can be defined in a single instance of <code><nowiki>{{infobox}}</nowiki></code>. {{Infobox | title = Top level title | data1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | data2 = {{Infobox | decat = yes | child = yes |title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | data1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | data2 = {{Infobox | decat = yes | child = yes |title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} Note, in the examples above, the child infobox is placed in a <code>data</code> field, not a <code>header</code> field. Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a '''header''' field (but not in a '''label''' field because it would not be displayed!), either using {{Infobox | title = Top level title | header1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | header2 = {{Infobox | decat = yes | child = yes | title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | header1 = {{Infobox | decat = yes | child = yes | title = First subsection | label1= Label 1.1 | data1 = Data 1.1 }} | header2 = {{Infobox | decat = yes | child = yes | title = Second subsection | label1= Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} or, {{Infobox | title = Top level title | header1 = First subsection {{Infobox | decat = yes | child = yes | label1 = Label 1.1 | data1 = Data 1.1 }} | header2 = Second subsection {{Infobox | decat = yes | child = yes | label1 = Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | title = Top level title | header1 = First subsection {{Infobox | decat = yes | child = yes | label1 = Label 1.1 | data1 = Data 1.1 }} | header2 = Second subsection {{Infobox | decat = yes | child = yes | label1 = Label 2.1 | data1 = Data 2.1 }} | belowstyle = | below = Below text }} </syntaxhighlight>{{clear}} Note that omitting the {{para|title}} parameter, and not including any text preceding the embedded infobox, may result in spurious blank table rows, creating gaps in the visual presentation. The garbage output can be suppressed using {{para|rowstyleN|display: none}}, replacing N with the data/header number. [[Wikipedia:WikiProject Infoboxes/embed]] includes some links to Wikipedia articles which include infoboxes embedded within other infoboxes. == Subboxes == An alternative method for embedding is to use {{para|subbox|yes}}, which removes the outer border from the infobox, but preserves the interior structure. One feature of this approach is that the parent and child boxes need not have the same structure, and the label and data fields are not aligned between the parent and child boxes because they are not in the same parent table. {{Infobox | headerstyle = background-color:#eee; | labelstyle = background-color:#eee; | header1 = Main 1 | header2 = Main 2 | data3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | data4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | label5 = Label 5 | data5 = Data 5 | header6 = Main 6 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | headerstyle = background-color:#eee; | labelstyle = background-color:#eee; | header1 = Main 1 | header2 = Main 2 | data3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | data4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | label5 = Label 5 | data5 = Data 5 | header6 = Main 6 }} </syntaxhighlight>{{clear}} Similar embedding techniques may be used within content parameters of some other templates generating tables (such as [[:Template:Sidebar|Sidebar]]) : {{Sidebar | navbar = off | headingstyle = background-color:#eee; | heading1 = Heading 1 | heading2 = Heading 2 | content3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | content4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | heading5 = Heading 5 }} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Sidebar | navbar = off | headingstyle = background-color:#eee; | heading1 = Heading 1 | heading2 = Heading 2 | content3 = {{Infobox | subbox = yes | headerstyle = background-color:#ccc; | labelstyle = background-color:#ddd; | header1 = Sub 3-1 | header2 = Sub 3-2 | label3 = Label 3-3 | data3 = Data 3-3 }} | content4 = {{Infobox | subbox = yes | labelstyle = background-color:#ccc; | label1 = Label 4-1 | data1 = Data 4-1 }} | heading5 = Heading 5 }} </syntaxhighlight>{{clear}} Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's a higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes. == Controlling line-breaking in embedded bulletless lists == Template {{tlx|nbsp}} may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists embedded in infoboxes (e.g. cast list in {{tlx|Infobox film}}), to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details. == Full blank syntax == (Note: there is no limit to the number of possible rows; only 20 are given below since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.) <syntaxhighlight lang="wikitext" style="overflow:auto"> {{Infobox | name = {{subst:PAGENAME}} | child = {{{child|}}} | subbox = {{{subbox|}}} | italic title = {{{italic title|no}}} | templatestyles = | child templatestyles = | grandchild templatestyles = | bodystyle = | titlestyle = | abovestyle = | subheaderstyle = | title = | above = | subheader = | imagestyle = | captionstyle = | image = | caption = | image2 = | caption2 = | headerstyle = | labelstyle = | datastyle = | header1 = | label1 = | data1 = | header2 = | label2 = | data2 = | header3 = | label3 = | data3 = | header4 = | label4 = | data4 = | header5 = | label5 = | data5 = | header6 = | label6 = | data6 = | header7 = | label7 = | data7 = | header8 = | label8 = | data8 = | header9 = | label9 = | data9 = | header10 = | label10 = | data10 = | header11 = | label11 = | data11 = | header12 = | label12 = | data12 = | header13 = | label13 = | data13 = | header14 = | label14 = | data14 = | header15 = | label15 = | data15 = | header16 = | label16 = | data16 = | header17 = | label17 = | data17 = | header18 = | label18 = | data18 = | header19 = | label19 = | data19 = | header20 = | label20 = | data20 = | belowstyle = | below = }} </syntaxhighlight>{{clear}} {{Help:Infobox/user style}} == Porting to other MediaWikis == The infobox template requires the [[:mw:Extension:Scribunto|Scribunto]] and [[:mw:Extension:TemplateStyles|TemplateStyles]] extensions. [[Wikipedia:WikiProject Transwiki|WikiProject Transwiki]] has a version of this template that has been modified to work on other MediaWikis. == TemplateData == {{TemplateData header}} <templatedata> { "description": "This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.", "format": "{{_\n| ________________ = _\n}}\n", "params": { "title": { "label": "Title", "description": "Title displayed above the infobox", "type": "string", "suggested": true }, "image": { "label": "Image", "description": "Image illustrating the topic. Use full image syntax.", "type": "content", "suggested": true, "example": "[[File:example.png|200px|alt=Example alt text]]" }, "caption": { "label": "Caption", "description": "caption for the image", "type": "content", "suggested": true } }, "paramOrder": [ "title", "image", "caption" ] } </templatedata> ==Tracking categories== * {{Category link with count|Articles with missing Wikidata information}} * {{Category link with count|Articles using infobox templates with no data rows}} * {{Category link with count|Pages using embedded infobox templates with the title parameter}} ==See also== * [[Module:Infobox]], the [[WP:LUA|Lua]] module on which this template is based * [[Module:Check for unknown parameters]] * {{tl|Infobox3cols}} * {{tl|Navbox}} and {{tl|Sidebar}} * [[Wikipedia:List of infoboxes|List of infoboxes]] * [[:Module:InfoboxImage]] <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Infobox templates| ]] [[Category:Wikipedia metatemplates|Infobox]] [[Category:Templates generating microformats]] [[Category:Templates that add a tracking category]] [[Category:Templates based on the Infobox Lua module]] }}</includeonly> b7ba187ea76ee960bbe295ad01c44c646eaedadb Template:Uses TemplateStyles 10 80 198 197 2024-02-06T23:50:47Z Otonashi Ayana 2 1 revision imported from [[:meta:Template:Uses_TemplateStyles]]: w wikitext text/x-wiki <div style="width:250px;float:right;clear:right;margin:0 0 1em 1em;border:1px solid black;-moz-border-radius:10px;-webkit-border-radius:10px;padding:10px 10px 10px 10px; background:#FFFFFF;"> <p style="margin:0 3% 0 3%;text-align:center;font-size:94%"> [[File:Farm-Fresh css add.svg|left|30px]] '''This template uses [[Help:TemplateStyles|TemplateStyles]]''' <br /> {{{1|}}} </p></div><includeonly>{{#ifeq:{{SUBPAGENAME}}|doc||[[Category:Templates that use TemplateStyles|{{PAGENAME}}]]}}</includeonly><noinclude> {{clr}} {{Documentation}}</noinclude> fed44ca463856190bcf6280438ed7ea020ad82c3 Module:Infobox/styles.css 828 18 199 168 2024-02-06T23:53:00Z Otonashi Ayana 2 Otonashi Ayana changed the content model of the page [[Module:Infobox/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:Documentation/styles.css 828 52 200 180 2024-02-06T23:53:26Z Otonashi Ayana 2 Otonashi Ayana changed the content model of the page [[Module:Documentation/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Module:Hatnote/styles.css 828 34 201 66 2024-02-06T23:53:35Z Otonashi Ayana 2 Otonashi Ayana changed the content model of the page [[Module:Hatnote/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Module:Navbar/styles.css 828 38 203 74 2024-02-06T23:54:32Z Otonashi Ayana 2 Otonashi Ayana changed the content model of the page [[Module:Navbar/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Template:Hlist/styles.css 10 73 204 144 2024-02-06T23:54:51Z Otonashi Ayana 2 Otonashi Ayana changed the content model of the page [[Template:Hlist/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Template:Nobold/styles.css 10 14 205 26 2024-02-06T23:55:31Z Otonashi Ayana 2 Otonashi Ayana changed the content model of the page [[Template:Nobold/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp-template}} */ /* Styling for Template:Nobold */ .nobold { font-weight: normal; } 83e5f0adacf8c7984251f1fd9d11ed82ebaadf03 Template:Div col/styles.css 10 45 206 88 2024-02-06T23:55:45Z Otonashi Ayana 2 Otonashi Ayana changed the content model of the page [[Template:Div col/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=yes}} */ .div-col { margin-top: 0.3em; column-width: 30em; } .div-col-small { font-size: 90%; } .div-col-rules { column-rule: 1px solid #aaa; } /* Reset top margin for lists in div col */ .div-col dl, .div-col ol, .div-col ul { margin-top: 0; } /* Avoid elements breaking between columns See also Template:No col break */ .div-col li, .div-col dd { page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */ break-inside: avoid-column; } c6c2dc0cb2bab7a5f7b4eb938eebc5c67df087bc MediaWiki:Common.css 8 3 207 4 2024-02-06T23:57:11Z Otonashi Ayana 2 css text/css body{ background:black !important; color:white !important; } .mw-page-container{ background:rgb(49,49,49) !important; } .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color:white; } cb98f021d6c6928d7d0d3efc08b21318ed3088db 208 207 2024-02-07T00:05:10Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } 7d296b066dbe752889040fe49d7cf54c437a162c 213 208 2024-02-07T00:26:23Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } 8b38fb900e980ef8cd00284e3f84a65d41e89ed6 215 213 2024-02-07T00:35:00Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:black; border:1px solid white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } 5e1285b77563e938bdd9fc43cba639e53af32a9b Template:Infobox character 10 81 209 2024-02-07T00:14:49Z Otonashi Ayana 2 Created page with "<templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = {{{image}}} | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | label6 = STR | data6 = {{{str}}} | label7 = DEX | data7 = {{{dex}}} | label8 = PER | data8 = {{{per}}} | label9 = KNW | data9 = {{{knw}}} | label10 = CHR | data10 = {{{chr}}} }}" wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = {{{image}}} | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | label6 = STR | data6 = {{{str}}} | label7 = DEX | data7 = {{{dex}}} | label8 = PER | data8 = {{{per}}} | label9 = KNW | data9 = {{{knw}}} | label10 = CHR | data10 = {{{chr}}} }} c0a3fe067b31909d8b7978afacb85e6849d81181 212 209 2024-02-07T00:24:56Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = {{{image}}} | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | label6 = STR | data6 = {{{str}}} | label7 = DEX | data7 = {{{dex}}} | label8 = PER | data8 = {{{per}}} | label9 = KNW | data9 = {{{knw}}} | label10 = CHR | data10 = {{{chr}}} | titlestyle = background:black | headerstyle = background:black | bodystyle = border-spacing:3.5px; }} 08c3f7c2efcc9c82a526695b51793ef71a1b1079 217 212 2024-02-07T00:43:56Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | label6 = STR | data6 = {{{str}}} | label7 = DEX | data7 = {{{dex}}} | label8 = PER | data8 = {{{per}}} | label9 = KNW | data9 = {{{knw}}} | label10 = CHR | data10 = {{{chr}}} | titlestyle = background:black | headerstyle = background:black | bodystyle = border-spacing:3.5px; }} cdd4473e24723ff982bb05242b0d061e3e0dd0c2 219 217 2024-02-07T01:33:04Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr"> <div class="stat"><span>STR</span>{{{str}}}</div> <div class="stat"><span>DEX</span>{{{dex}}}</div> <div class="stat"><span>PER</span>{{{per}}}</div> <div class="stat"><span>KNW</span>{{{knw}}}</div> <div class="stat"><span>CHR</span>{{{chr}}}</div> </div> | titlestyle = background:black | headerstyle = background:black | bodystyle = border-spacing:3.5px; }} e68e06ce97a31309de272889ce9f64cd29f89a46 224 219 2024-02-07T01:43:54Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr;text-align:center"> <div class="stat"><span>STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span>DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span>PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span>KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span>CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black | headerstyle = background:black | bodystyle = border-spacing:3.5px; }} ae6e51dae15c781b31d276f230009ef5cf6918fe 225 224 2024-02-07T01:46:03Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black | headerstyle = background:black | bodystyle = border-spacing:3.5px; }} f969ec9d09741b8263ebcd1dcab39d00f7a034c1 227 225 2024-02-07T01:49:49Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black | headerstyle = background:black | bodystyle = border-spacing:3.5px; | imagestyle = text-align:center }} 5d99a26abe90ef630a33e1c1953addd72076493d 228 227 2024-02-07T01:54:04Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = {{{name}}} | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Title | data2 = {{{title}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black | headerstyle = background:black | bodystyle = border-spacing:3.5px; | imagestyle = text-align:center }} 0755840fb4183f5ddc202fc53ce512bb9cc5b5a8 230 228 2024-02-07T02:06:54Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | above = {{{name}}} | subheader = {{{title}}} | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | abovestyle = background:black | subheaderstyle = background:black;text-align:center | headerstyle = background:black | bodystyle = border-spacing:3.5px; | imagestyle = text-align:center }} 13ba65d51d1ac6fe2b6cfae26c8e39be2eb39ce4 231 230 2024-02-07T02:08:40Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br>{{{title}}} | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black | headerstyle = background:black | bodystyle = border-spacing:3.5px; | imagestyle = text-align:center }} 5fcd5a2790b0fb03bab7b19b0aa5bd8f42899b33 232 231 2024-02-07T02:11:12Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">{{{title}}}</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black | bodystyle = border-spacing:3.5px; | imagestyle = text-align:center }} 4c19d6c93bec2c647905262782ea72f1f4c41647 233 232 2024-02-07T02:12:25Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | header5 = Stats | data6 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black | bodystyle = border-spacing:3.5px; | imagestyle = text-align:center }} 8f27e66acd4aeedd02b638d8879959549888629f 235 233 2024-02-07T02:19:00Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Perks | data5 = {{{perks}}} | label6 = Prep Item | data6 = {{{item}}} | header7 = Stats | data8 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black | bodystyle = border-spacing:3.5px; | imagestyle = text-align:center }} a6af679bfab442cb5d770c7c952a3caab247525e 236 235 2024-02-07T02:24:37Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Perks | data5 = {{{perks}}} | label6 = Prep Item | data6 = {{{item}}} | header7 = Stats | data8 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black | bodystyle = vertical-align:top | imagestyle = text-align:center }} 756f1b9a828be5b8e982eae627981ac88a501606 237 236 2024-02-07T02:25:53Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Perks | data5 = {{{perks}}} | label6 = Prep Item | data6 = {{{item}}} | header7 = Stats | data8 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black | labelstyle = vertical-align:top | imagestyle = text-align:center }} b36d365def07f9e1caf7ea4983a05393ae8a47a7 Template:Infobox character/styles.css 10 82 210 2024-02-07T00:18:45Z Otonashi Ayana 2 Created page with ".infobox{ position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:1px; left:1px; right:1px; bottom:1px; border:1px solid white; }" sanitized-css text/css .infobox{ position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:1px; left:1px; right:1px; bottom:1px; border:1px solid white; } 9cb359d26afefc688b3d8dc993b5f91c93ea81ab 211 210 2024-02-07T00:20:42Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:2px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:2px solid white; } 06339bcdd40e64abd97203e7434ae0440fdd1707 218 211 2024-02-07T00:47:56Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } 097d4ad448c5d9fc67bc1cd3090ef0c64f940279 220 218 2024-02-07T01:33:32Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; width:300px; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } 0fd2b74ea34a6584ad37f23dd9ef21b033647c5f 221 220 2024-02-07T01:33:48Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; width:250px; text-align:center; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } 78990a8ea2e7cff831479d11c031283caa6e55f4 222 221 2024-02-07T01:35:12Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; width:250px; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } .stat{ border:1px solid black; } .stat>span { background:black; } dcf61e037615cf0f7c5d4ad68a33e966a430310a 223 222 2024-02-07T01:40:14Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; width:250px; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } .stat{ border:1px solid black; border-collapse:collapse; } .stat>span { display:inline-block; background:black; padding:1px; width:45px; text-align:center; } f086a2de09555f6e38c9a0c29cc70d9c8c895d8d 226 223 2024-02-07T01:48:48Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; min-width:210px; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } .stat-label{ display:inline-block; background:black; padding:1px; width:45px; text-align:center; } .stat-value{ border:1px solid black; } 1dfd27e541899e3b5fdeb8ff699ef6d0d34b563a 229 226 2024-02-07T01:55:02Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; min-width:210px; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } .stat-label{ display:inline-block; background:black; padding:1px; width:45px; text-align:center; } .stat-value{ display:inline-block; border:1px solid black; width:30px; border-radius:0px 4px 4px 0px; } 0c6670637acdf2cfb150ba69f3340f8a57cb03b5 234 229 2024-02-07T02:17:38Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; min-width:210px; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } .infobox-image img{ margin-bottom:-2px; } .stat-label{ display:inline-block; background:black; padding:1px; width:45px; text-align:center; } .stat-value{ display:inline-block; border:1px solid black; width:30px; border-radius:0px 4px 4px 0px; } e9291f3dca69fb804d4ebb17c1e3a0adf04e73a8 File:Char6 mimi.svg 6 83 214 2024-02-07T00:27:51Z Otonashi Ayana 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Char6 mimi.png 6 84 216 2024-02-07T00:36:25Z Otonashi Ayana 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 238 216 2024-02-07T02:27:35Z Otonashi Ayana 2 Otonashi Ayana uploaded a new version of [[File:Char6 mimi.png]] wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Module:High-use 828 60 317 118 2024-02-07T02:05:53Z wikipedia>Pppery 0 Don't auto-categorize redirects Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return "a very large number of" else return "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) if frame.args[1] == "risk" then return "risk" else local count = _fetch(frame) if count and count >= 100000 then return "risk" end end return "" end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise and not mw.title.getCurrentTitle().isRedirect then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p e22649bbbdf0185575aade09174113873db5066a Template:Infobox character 10 81 239 237 2024-02-07T02:29:17Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = {{{image}}} | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Perks | data5 = {{{perks}}} | label6 = Prep Item | data6 = {{{item}}} | header7 = Stats | data8 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black | labelstyle = vertical-align:top | imagestyle = text-align:center }} 854ff8d9e47c3b4c49f851a48a227b7e467788f0 242 239 2024-02-07T02:37:53Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Perks | data5 = {{{perks}}} | label6 = Prep Item | data6 = {{{item}}} | header7 = Stats | data8 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black | labelstyle = vertical-align:top | imagestyle = text-align:center }} b36d365def07f9e1caf7ea4983a05393ae8a47a7 243 242 2024-02-07T02:42:17Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Loadout | data5 = {{{loadout|}}} | header6 = Stats | data7 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black | labelstyle = vertical-align:top | imagestyle = text-align:center }} 0523e57809d84c6f91ffc8e92451c646573f3293 Template:Infobox character/styles.css 10 82 240 234 2024-02-07T02:36:18Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; min-width:210px; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } .infobox-image img{ height:100%; width:100%; margin-bottom:-2px; } .stat-label{ display:inline-block; background:black; padding:1px; width:45px; text-align:center; } .stat-value{ display:inline-block; border:1px solid black; width:30px; border-radius:0px 4px 4px 0px; } 15765f26cc5c953588a92fc30d0ae617429a39f8 241 240 2024-02-07T02:37:36Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; border:1px solid black; width:220px; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } .infobox-image img{ height:100%; width:100%; margin-bottom:-2px; } .stat-label{ display:inline-block; background:black; padding:1px; width:45px; text-align:center; } .stat-value{ display:inline-block; border:1px solid black; width:30px; border-radius:0px 4px 4px 0px; } 9788c38bb75735ad37ebd4ff7ade0fc6c78fd17e Mimi 0 85 244 2024-02-07T02:43:29Z Otonashi Ayana 2 Created page with "{{Infobox character | name = Mimi | image = char6_mimi.png | title = Med Student | age = 22 | sex = Female | loadout = [[Scalpel]]<br>[[Mimi's Obsession]] | str = 6 | dex = 5 | per = 7 | knw = 8 | chr = 7 }}" wikitext text/x-wiki {{Infobox character | name = Mimi | image = char6_mimi.png | title = Med Student | age = 22 | sex = Female | loadout = [[Scalpel]]<br>[[Mimi's Obsession]] | str = 6 | dex = 5 | per = 7 | knw = 8 | chr = 7 }} e61d85f0935729e20adda0a2ec62662cb85188ce 329 244 2024-02-07T02:46:26Z Otonashi Ayana 2 wikitext text/x-wiki {{Infobox character | name = Mimi | image = char6_mimi.png | title = Med Student | age = 22 | sex = Female | loadout = [[Scalpel]]<br>[[Mimi's Obsession]] | str = 6 | dex = 5 | per = 7 | knw = 8 | chr = 7 }}{{nihongo|'''Mimi'''|美々}} is an unlockable [[playable character]] in {{woh}}. She is unlocked by earning the [[World Saved II]] achievement. [[Category:Playable characters]] [[Category:Characters]] 9bd7c37023f1bca0c1156bd88b636d2876aa109a Template:Nihongo 10 86 246 245 2024-02-07T02:44:04Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Nihongo]] wikitext text/x-wiki <includeonly>{{#invoke:Nihongo|nihongo}}</includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis to Wikidata. --> </noinclude> d0dcc4933a65afd93128f90aa7ce4ba2c8bd20e7 Template:Literal translation 10 87 248 247 2024-02-07T02:44:05Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Literal_translation]] wikitext text/x-wiki {{#if:{{{sortable|}}} |<span style="display:none;">{{{1|}}}</span> }}{{#if:{{{i|}}} |<nowiki/>'' }}{{abbr|style=font-size:85%|{{#switch:{{{lk|}}} |yes|on = [[Literal translation|lit.]] |#default = lit. }}|literal translation}}{{#if:{{{i|}}} |''<nowiki/> }}{{#if:{{{1|}}} | {{thinsp}}<nowiki>'</nowiki>{{{1}}}{{#if:{{str endswith|{{{1}}}|''}}|{{'}}|&#39;}} }}{{#if:{{{2|}}} | {{sp}} or <nowiki>'</nowiki>{{{2}}}{{#if:{{str endswith|{{{2}}}|''}}|{{'}}|&#39;}} }}{{#if:{{{3|}}} | {{sp}} or <nowiki>'</nowiki>{{{3}}}{{#if:{{str endswith|{{{3}}}|''}}|{{'}}|&#39;}} }}{{#if:{{{4|}}} | {{sp}} or <nowiki>'</nowiki>{{{4}}}{{#if:{{str endswith|{{{4}}}|''}}|{{'}}|&#39;}} }}<noinclude> {{Documentation}} </noinclude> 1a7e9904a6e7bb60117c687c5c373fb9cf76c44c Template:Abbr 10 88 250 249 2024-02-07T02:44:05Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Abbr]] wikitext text/x-wiki <abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}} </noinclude> 5fd53aa19ba927ce3eea9092a4fa31f881df0a6e Template:Thinsp 10 89 252 251 2024-02-07T02:44:06Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Thinsp]] wikitext text/x-wiki #REDIRECT [[Template:Thin space]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} 2469064d969db6a9cf1e47e2d1ee0a5e2c9eb495 Template:Thin space 10 90 254 253 2024-02-07T02:44:07Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Thin_space]] wikitext text/x-wiki <span style="white-space: nowrap;">{{#if:{{{1|}}}|{{#if:{{{2|}}}||&thinsp;}}}}{{{1|}}}&thinsp;<!-- -->{{#if:{{{2|}}}|{{{2}}}}}{{#if:{{{3|}}}|&thinsp;{{{3}}}}}<!-- -->{{#if:{{{4|}}}|&thinsp;{{{4}}}}}{{#if:{{{5|}}}|&thinsp;{{{5}}}}}<!-- -->{{#if:{{{6|}}}|&thinsp;{{{6}}}}}{{#if:{{{7|}}}|&thinsp;{{{7}}}}}<!-- -->{{#if:{{{8|}}}|&thinsp;{{{8}}}}}{{#if:{{{9|}}}|&thinsp;{{{9}}}}}<!-- -->{{#if:{{{10|}}}|&thinsp;{{{10}}}}}</span><noinclude> {{Documentation}} <!-- Please add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5f135f79d223a744b75485254555580623480420 Template:Str endswith 10 91 256 255 2024-02-07T02:44:07Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Str_endswith]] wikitext text/x-wiki {{#ifeq:{{{1|a}}}{{{2|a}}}|{{{1|b}}}{{{2|b}}}|{{#invoke:String|endswith|source={{{1}}}|pattern={{{2}}} }}|yes<!--backward compatibility -->}}<noinclude> {{documentation}} </noinclude> 13dfad2dc8c562869bc85a37524258ffebf9a62f Module:Lang 828 92 258 257 2024-02-07T02:44:07Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Lang]] Scribunto text/plain --[=[ Lua support for the {{lang}}, {{lang-xx}}, and {{transliteration}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_latin() and is_rtl() local yesno = require ('Module:Yesno'); local lang_data = mw.loadData ('Module:Lang/data'); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ validates |italic= or |italics= assigned values. When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or transl function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-xx}} depending on the individual template's requirements, 'italic' for {{transliteration}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-xx}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {['yes'] = 'italic', ['no'] = 'normal', ['unset'] = 'inherit', ['invert'] = 'invert', ['default'] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, 'only one of |italic=, |italics=, or |i= can be specified'; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-xx}} templates is to add categorization when the templates are used in mainspace. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array ( needle, haystack ) if needle == nil then return false; end for n,v in ipairs( haystack ) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ prettify ietf tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-xx}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=) returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. see http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1 ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- ietf tag parts if not is_set (source) then return nil, nil, nil, nil, nil, 'missing language tag'; end local pattern = { -- table of tables holding acceptibe ietf tag patterns and short names of the ietf part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured ietf tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named ietf parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language tag: ', source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language code: ', code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, 'redundant script tag'; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, table.concat ({'unrecognized script: ', script, ' for code: ', code}); -- language code ok, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, table.concat ({'script: ', script, ' not supported for code: ', code}); -- language code ok, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, 'redundant region tag'; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, table.concat ({'unrecognized region: ', region, ' for code: ', code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, 'redundant variant tag'; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-script pair: ', code, '-', script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-region pair: ', code, '-', region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code: ', code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, table.concat ({'unrecognized private tag: ', private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args, template) local out = {}; local category; if 'Transliteration' == template then category = 'Transliteration'; else category = 'Lang and lang-xx' end table.insert (out, table.concat ({'[', args.text or 'undefined', '] '})); -- for error messages output args.text if available table.insert (out, table.concat ({'<span style=\"color:#d33\">Error: {{', template, '}}: '})); table.insert (out, msg); table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'})); table.insert (out, '</span>'); if (0 == namespace or 10 == namespace) and not args.nocat then -- categorize in article space (and template space to take care of broken usages) table.insert (out, table.concat ({'[[Category:', category, ' template errors]]'})); end return table.concat (out); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- adds <i> and </i> tags to list-item text or to implied <p>..</p> text. mixed not supported ]] local function div_markup_add (text, style) local implied_p = {}; if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics mediawiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each impled p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in html markup. This because the lang= attibute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the html markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default html tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> html tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening html tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> html tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = table.concat ({language, ' text'}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = table.concat ({language, ' collective text'}); -- for collective languages else title_text = table.concat ({language, '-language text'}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Category:Articles containing <language>-language text]] for English: [[Category:Articles containing explicitly cited English-language text]] for ISO 639-2 collective languages (and for 639-1 bh): [[Category:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) local cat = {}; local retval; if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return table.concat ({'[[Category:Articles with text in ', language_name, ']]'}); end table.insert (cat, '[[Category:Articles containing '); if this_wiki_lang_tag == code then table.insert (cat, 'explicitly cited ' .. language_name); -- unique category name for the local language else table.insert (cat, language_name); end table.insert (cat, '-language text]]'); return table.concat (cat); end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string The value |script= is not used in {{transliteration}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transliteration}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript) This function is used by both lang_xx() and transl() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style transl() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transliteration}}, style only applies when a language code is provided ]] local function make_translit (code, language_name, translit, std, tscript, style) local title; local out_t = {}; local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' romanization'; -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = title_text .. table.concat ({title_t[std][tscript:lower()], ' (', script_table[tscript], ' script) transliteration'}); -- add the appropriate text to the tool tip else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (transl may not provide a language code) title_text = title_text .. table.concat ({title_t[std][code:lower()], ' (', language_name, ' language) transliteration'}); -- add the appropriate text to the tool tip else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = title_text .. table.concat ({language_name, '-script transliteration'}); -- write a script tool tip elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' transliteration'; -- finish the tool tip else title_text = title_text .. ' transliteration'; -- generic tool tip (can we ever get here?) end end end local close_tag; if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transliteration}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style table.insert (out_t, "<i lang=\""); -- so use <i> tag close_tag = '</i>'; -- tag to be used when closing else table.insert (out_t, table.concat ({'<span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it close_tag = '</span>'; -- tag to be used when closing end table.insert (out_t, code); table.insert (out_t, "-Latn\">"); -- transliterations are always Latin script else table.insert (out_t, "<span>"); -- when no language code: no lang= attribute, not italic ({{transliteration}} only) close_tag = '</span>'; end table.insert (out_t, translit); -- add the translit text table.insert (out_t, close_tag); -- and add the appropriate </i> or </span> if '' == title_text then -- when there is no need for a tool-tip return table.concat (out_t); -- make a string and done else return title_wrapper_make (title_text, table.concat (out_t), 'span'); -- wrap with a tool-tip span and don end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg ('no text', args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg ('text has malformed markup', args, template); end local style = args.italic; if ('unset' ~= style) and ('invert' ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg ('text has italic markup', args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ render mainenance messages and categories ]] local function render_maint(nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ for proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and / or inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ looks for a poem strip marker in text; returns true when found; false else auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate html tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns as nil with a second return value of true indicating that some other value has been assigned to |proto= ]] local function validate_proto (proto_param) if 'yes' == proto_param then return true; elseif 'no' == proto_param then return false; elseif is_set (proto_param) then return nil, true; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- common function to return language name from the data set according to IETF tag returns language name if found in data tables; nil else ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to iana active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the iana deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'})); end return name; -- name from data tables or nil end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg ('conflicting: {{{1}}} and |code=', args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg ('conflicting: {{{2}}} and |text=', args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg ( msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and unicode.is_Latin (args.text)) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant if 'invert' == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function lang (frame) local args = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return _lang (args); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- stand-alone function to create literal translation of main text Also used by {{lang-x2}} ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> html tag if 'no' == args_t.link then table.insert (translation_t, '<abbr title="literal translation">lit.</abbr>'); -- unlinked form else table.insert (translation_t, make_wikilink ('Literal translation', 'lit.')); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> html tag end table.insert (translation_t, table.concat ({'&#39;', args_t.translation, '&#39;'})); -- use html entities to avoid wiki markup confusion return table.concat (translation_t); -- make a big string and done end --[[--------------------------< L A N G _ X X >---------------------------------------------------------------- For the {{lang-xx}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-xx}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-xx}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-xx}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-xx}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args) local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local translit_title; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang-xx'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if args[1] and args.text then return make_error_msg ('conflicting: {{{1}}} and |text=', args, template); else args.text = args[1] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly if args[2] and args.translit then return make_error_msg ('conflicting: {{{2}}} and |translit=', args, template); else args.translit = args[2] or args.translit -- prefer args.translit end if args[3] and (args.translation or args.lit) then return make_error_msg ('conflicting: {{{3}}} and |lit= or |translation=', args, template); elseif args.translation and args.lit then return make_error_msg ('conflicting: |lit= and |translation=', args, template); else args.translation = args[3] or args.translation or args.lit; -- prefer args.translation end if args.links and args.link then return make_error_msg ('conflicting: |links= and |link=', args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if 'no' == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (language_name .. ' language', language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if 'invert' == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not unicode.is_Latin (args.text) then -- transliteration (not supported in {{lang}}); not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object if translit_title.exists and ('no' ~= args.link) then table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'romanized') .. ':'); -- make a wikilink if there is an article to link to else table.insert (out, 'romanized:'); -- else plain text end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script']) if is_set (translit) then table.insert (out, translit); else return make_error_msg (table.concat ({'invalid translit-std: \'', args['translit-std'] or '[missing]'}), args, template); end end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- common function to get args table from {{lang-??}} templates returns table of args ]] local function lang_xx_args_get (frame) local args = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if 1 == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-xx}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame); initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point ffrom another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-xx}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame); initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the ietf language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the ietf language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = 'yes' == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (language_name .. ' language', label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|<ietf tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the ietf language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = 'language: ' .. args[1] .. ' not found' -- language name not found, error message end else msg = 'missing language name' -- language name not provided, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ T R A N S L >---------------------------------------------------------------- Module entry point from another module ]] local function _transl (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transliteration|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (table.concat ({'unrecognized transliteration standard: ', args.translit_std}), args, 'Transliteration'); end else if is_set (args[2]) then -- [2] set when {{transliteration|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg ('no text', args, 'Transliteration'); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg ('missing language / script code', args, 'Transliteration'); end end end if is_set (args[1]) then -- IANA language code used for html lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (table.concat ({'unrecognized language / script code: ', args[1]}), args, 'Transliteration'); -- invalid language / script code end else return make_error_msg ('missing language / script code', args, 'Transliteration'); -- missing language / script code so quit end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, 'Transliteration'); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (table.concat ({'unrecognized language / script code: ', args.code}), args, 'Transliteration'); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic); end --[[--------------------------< T R A N S L >------------------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function transl (frame) return _transl (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = 'yes' == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}} ]] local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|<ietf tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, lang = lang, -- entry point for {{lang}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns ietf tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates transl = transl, -- entry point for {{transliteration}} _category_from_tag = _category_from_tag, -- entry points when this module is require()d into other modules _lang = _lang, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _transl = _transl, _translation_make = translation_make, }; b4bf37fa610695625e5f1ff5d33471dfaaf8af34 Module:Unicode data 828 93 260 259 2024-02-07T02:44:08Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Unicode_data]] Scribunto text/plain local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1) else -- level is actually the format string. return error(string.format(level, ...), 2) end end local function binary_range_search(codepoint, ranges) local low, mid, high low, high = 1, ranges.length or require "Module:TableTools".length(ranges) while low <= high do mid = floor((low + high) / 2) local range = ranges[mid] if codepoint < range[1] then high = mid - 1 elseif codepoint <= range[2] then return range, mid else low = mid + 1 end end return nil, mid end p.binary_range_search = binary_range_search --[[ local function linear_range_search(codepoint, ranges) for i, range in ipairs(ranges) do if range[1] <= codepoint and codepoint <= range[2] then return range end end end --]] -- Load a module by indexing "loader" with the name of the module minus the -- "Module:Unicode data/" part. For instance, loader.blocks returns -- [[Module:Unicode data/blocks]]. If a module cannot be loaded, false will be -- returned. local loader = setmetatable({}, { __index = function (self, key) local success, data = pcall(mw.loadData, "Module:Unicode data/" .. key) if not success then data = false end self[key] = data return data end }) -- For the algorithm used to generate Hangul Syllable names, -- see "Hangul Syllable Name Generation" in section 3.12 of the -- Unicode Specification: -- https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf local name_hooks = { { 0x00, 0x1F, "<control-%04X>" }, -- C0 control characters { 0x7F, 0x9F, "<control-%04X>" }, -- DEL and C1 control characters { 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A { 0x4E00, 0x9FFF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph { 0xAC00, 0xD7A3, function (codepoint) -- Hangul Syllables local Hangul_data = loader.Hangul local syllable_index = codepoint - 0xAC00 return ("HANGUL SYLLABLE %s%s%s"):format( Hangul_data.leads[floor(syllable_index / Hangul_data.final_count)], Hangul_data.vowels[floor((syllable_index % Hangul_data.final_count) / Hangul_data.trail_count)], Hangul_data.trails[syllable_index % Hangul_data.trail_count] ) end }, -- High Surrogates, High Private Use Surrogates, Low Surrogates { 0xD800, 0xDFFF, "<surrogate-%04X>" }, { 0xE000, 0xF8FF, "<private-use-%04X>" }, -- Private Use -- CJK Compatibility Ideographs { 0xF900, 0xFA6D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xFA70, 0xFAD9, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0x17000, 0x187F7, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph { 0x18800, 0x18AFF, function (codepoint) return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF) end }, { 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph Supplement { 0x1B170, 0x1B2FB, "NUSHU CHARACTER-%04X" }, -- Nushu { 0x20000, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B { 0x2A700, 0x2B739, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension C { 0x2B740, 0x2B81D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension D { 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E { 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F -- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane) { 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17) end}, { 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G { 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H { 0x2EBF0, 0x2EE5D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension I { 0xF0000, 0xFFFFD, "<private-use-%04X>" }, -- Plane 15 Private Use { 0x100000, 0x10FFFD, "<private-use-%04X>" } -- Plane 16 Private Use } name_hooks.length = #name_hooks local name_range_cache local function generate_name(data, codepoint) if type(data) == "string" then return data:format(codepoint) else return data(codepoint) end end --[[ -- Checks that the code point is a number and in range. -- Does not check whether code point is an integer. -- Not used local function check_codepoint(funcName, argIdx, val) require 'libraryUtil'.checkType(funcName, argIdx, val, 'number') if codepoint < 0 or 0x10FFFF < codepoint then errorf("Codepoint %04X out of range", codepoint) end end --]] -- https://www.unicode.org/versions/Unicode11.0.0/ch04.pdf, section 4.8 function p.lookup_name(codepoint) -- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned -- (Cn) and specifically noncharacters: -- https://www.unicode.org/faq/private_use.html#nonchar4 if 0xFDD0 <= codepoint and (codepoint <= 0xFDEF or floor(codepoint % 0x10000) >= 0xFFFE) then return ("<noncharacter-%04X>"):format(codepoint) end if name_range_cache -- Check if previously used "name hook" applies to this code point. and codepoint >= name_range_cache[1] and codepoint <= name_range_cache[2] then return generate_name(name_range_cache[3], codepoint) end local range = binary_range_search(codepoint, name_hooks) if range then name_range_cache = range return generate_name(range[3], codepoint) end local data = loader[('names/%03X'):format(codepoint / 0x1000)] if data and data[codepoint] then return data[codepoint] -- Unassigned (Cn) consists of noncharacters and reserved characters. -- The character has been established not to be a noncharacter, -- and if it were assigned, its name would already been retrieved, -- so it must be reserved. else return ("<reserved-%04X>"):format(codepoint) end end function p.lookup_image(codepoint) local data = loader[('images/%03X'):format(codepoint / 0x1000)] if data then return data[codepoint] end end local planes = { [ 0] = "Basic Multilingual Plane"; [ 1] = "Supplementary Multilingual Plane"; [ 2] = "Supplementary Ideographic Plane"; [ 3] = "Tertiary Ideographic Plane"; [14] = "Supplementary Special-purpose Plane"; [15] = "Supplementary Private Use Area-A"; [16] = "Supplementary Private Use Area-B"; } -- Load [[Module:Unicode data/blocks]] if needed and assign it to this variable. local blocks local function block_iter(blocks, i) i = i + 1 local data = blocks[i] if data then -- Unpack doesn't work on tables loaded with mw.loadData. return i, data[1], data[2], data[3] end end -- An ipairs-type iterator generator for the list of blocks. function p.enum_blocks() local blocks = loader.blocks return block_iter, blocks, 0 end function p.lookup_plane(codepoint) local i = floor(codepoint / 0x10000) return planes[i] or ("Plane %u"):format(i) end function p.lookup_block(codepoint) local blocks = loader.blocks local range = binary_range_search(codepoint, blocks) if range then return range[3] else return "No Block" end end function p.get_block_info(name) for i, block in ipairs(loader.blocks) do if block[3] == name then return block end end end function p.is_valid_pagename(pagename) local has_nonws = false for cp in mw.ustring.gcodepoint(pagename) do if (cp == 0x0023) -- # or (cp == 0x005B) -- [ or (cp == 0x005D) -- ] or (cp == 0x007B) -- { or (cp == 0x007C) -- | or (cp == 0x007D) -- } or (cp == 0x180E) -- MONGOLIAN VOWEL SEPARATOR or ((cp >= 0x2000) and (cp <= 0x200A)) -- spaces in General Punctuation block or (cp == 0xFFFD) -- REPLACEMENT CHARACTER then return false end local printable, result = p.is_printable(cp) if not printable then return false end if result ~= "space-separator" then has_nonws = true end end return has_nonws end local function manual_unpack(what, from) if what[from + 1] == nil then return what[from] end local result = {} from = from or 1 for i, item in ipairs(what) do if i >= from then table.insert(result, item) end end return unpack(result) end local function compare_ranges(range1, range2) return range1[1] < range2[1] end -- Creates a function to look up data in a module that contains "singles" (a -- code point-to-data map) and "ranges" (an array containing arrays that contain -- the low and high code points of a range and the data associated with that -- range). -- "loader" loads and returns the "singles" and "ranges" tables. -- "match_func" is passed the code point and either the data or the "dots", and -- generates the final result of the function. -- The varargs ("dots") describes the default data to be returned if there wasn't -- a match. -- In case the function is used more than once, "cache" saves ranges that have -- already been found to match, or a range whose data is the default if there -- was no match. local function memo_lookup(data_module_subpage, match_func, ...) local dots = { ... } local cache = {} local singles, ranges return function (codepoint) if not singles then local data_module = loader[data_module_subpage] singles, ranges = data_module.singles, data_module.ranges end if singles[codepoint] then return match_func(codepoint, singles[codepoint]) end local range = binary_range_search(codepoint, cache) if range then return match_func(codepoint, manual_unpack(range, 3)) end local range, index = binary_range_search(codepoint, ranges) if range then table.insert(cache, range) table.sort(cache, compare_ranges) return match_func(codepoint, manual_unpack(range, 3)) end if ranges[index] then local dots_range if codepoint > ranges[index][2] then dots_range = { ranges[index][2] + 1, ranges[index + 1] and ranges[index + 1][1] - 1 or 0x10FFFF, unpack(dots) } else -- codepoint < range[index][1] dots_range = { ranges[index - 1] and ranges[index - 1][2] + 1 or 0, ranges[index][1] - 1, unpack(dots) } end table.sort(cache, compare_ranges) end return match_func(codepoint) end end -- Get a code point's combining class value in [[Module:Unicode data/combining]], -- and return whether this value is not zero. Zero is assigned as the default -- if the combining class value is not found in this data module. -- That is, return true if character is combining, or false if it is not. -- See https://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values for -- more information. p.is_combining = memo_lookup( "combining", function (codepoint, combining_class) return combining_class and combining_class ~= 0 or false end, 0) function p.add_dotted_circle(str) return (mw.ustring.gsub(str, ".", function(char) if p.is_combining(mw.ustring.codepoint(char)) then return '◌' .. char end end)) end local lookup_control = memo_lookup( "control", function (codepoint, ccc) return ccc or "assigned" end, "assigned") p.lookup_control = lookup_control function p.is_assigned(codepoint) return lookup_control(codepoint) ~= "unassigned" end function p.is_printable(codepoint) local result = lookup_control(codepoint) return (result == "assigned") or (result == "space-separator"), result end function p.is_whitespace(codepoint) local result = lookup_control(codepoint) return (result == "space-separator"), result end p.lookup_category = memo_lookup( "category", function (codepoint, category) return category end, "Cn") local lookup_script = memo_lookup( "scripts", function (codepoint, script_code) return script_code or 'Zzzz' end, "Zzzz") p.lookup_script = lookup_script function p.get_best_script(str) -- Check type of argument, because mw.text.decode coerces numbers to strings! require "libraryUtil".checkType("get_best_script", 1, str, "string") -- Convert HTML character references (including named character references, -- or character entities) to characters. str = mw.text.decode(str, true) local scripts = {} for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) -- Ignore "Inherited", "Undetermined", or "Uncoded" scripts. if not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then scripts[script] = true end end -- If scripts does not contain two or more keys, -- return first and only key (script code) in table. if not next(scripts, next(scripts)) then return next(scripts) end -- else return majority script, or else "Zzzz"? end function p.is_Latin(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0340-U+10FFFF. If they are not found and there is at least -- one Latin-script character, the string counts as Latin, because the rest -- of the characters can only be Zyyy, Zinh, and Zzzz. -- The only scripts found below U+0370 (the first code point of the Greek -- and Coptic block) are Latn, Zyyy, Zinh, and Zzzz. -- See the codepage in the [[UTF-8]] article. if not str:find "[\205-\244]" then for codepoint in mw.ustring.gcodepoint(str) do if lookup_script(codepoint) == "Latn" then return true end end end local Latn = false for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if script == "Latn" then Latn = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return Latn end -- Checks that a string contains only characters belonging to right-to-left -- scripts, or characters of ignorable scripts. function p.is_rtl(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0580-U+10FFFF. If they are not found, the string can only -- have characters from a left-to-right script, because the first code point -- in a right-to-left script is U+0591, in the Hebrew block. if not str:find "[\214-\244]" then return false end local result = false local rtl = loader.scripts.rtl for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if rtl[script] then result = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return result end --[[--------------------------< I S _ R T L _ F R A M E >------------------------------------------------------ external entry from an {{#invoke:}} to determine if a string of text is rtl. Strips html and html-like tags so that those tags don't corrupt the is-rtl-is-not-rtl determination; this added for the cases where the rtl text has <br /> tags. ]] function p.is_rtl_frame (frame) local str = frame.args[1]; -- get the string from the {{#invoke:}} frame str = str:gsub ('%b<>', ''); -- strip any html and html-like tags return p.is_rtl (str); -- return if whatever remains rtl; false else end local function get_codepoint(args, arg) local codepoint_string = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) local codepoint = tonumber(codepoint_string, 16) or errorf(2, "Parameter %s is not a code point in hexadecimal base", tostring(arg)) if not (0 <= codepoint and codepoint <= 0x10FFFF) then errorf(2, "code point in parameter %s out of range", tostring(arg)) end return codepoint end local function get_func(args, arg, prefix) local suffix = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) suffix = mw.text.trim(suffix) local func_name = prefix .. suffix local func = p[func_name] or errorf(2, "There is no function '%s'", func_name) return func end -- This function allows any of the "lookup" functions to be invoked. The first -- parameter is the word after "lookup_"; the second parameter is the code point -- in hexadecimal base. function p.lookup(frame) local func = get_func(frame.args, 1, "lookup_") local codepoint = get_codepoint(frame.args, 2) local result = func(codepoint) if func == p.lookup_name then -- Prevent code point labels such as <control-0000> from being -- interpreted as HTML tags. result = result:gsub("<", "&lt;") end return result end function p.is(frame) local func = get_func(frame.args, 1, "is_") -- is_Latin and is_valid_pagename take strings. if func == p.is_Latin or func == p.is_valid_pagename or func == p.is_rtl then return (func(frame.args[2])) else -- The rest take code points. local codepoint = get_codepoint(frame.args, 2) return (func(codepoint)) -- Adjust to one result. end end return p 05d32e957906aa3f5219ad820cb06d9a096ea697 Module:Lang/data 828 94 262 261 2024-02-07T02:44:08Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Lang/data]] Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> iana registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source.active then -- for ~/iana_languages (active) for k, v in pairs (source.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Language/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Language/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Language/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug colsole: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite exisiting name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["smp"] = "Samaritan Hebrew", -- to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages (since deleted) --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A -- ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ca-x-old"] = "Old Catalan", ["cel-x-combrit"] = "Common Brittonic", -- cel in IANA is Celtic languages ["cel-x-proto"] = "Proto-Celtic", ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmw-x-ecg"] = "East Central German", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koinē Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["inc-x-mitanni"] = "Mitanni-Aryan", -- inc in IANA is Indic languages ["inc-x-proto"] = "Proto-Indo-Aryan", ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", ["xsc-x-pontic"] = "Pontic Scythian", -- xsc in IANA is Scythian ["xsc-x-saka"] = "Saka", ["xsc-x-sarmat"] = "Sarmatian", } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name>-language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij"] = "Ligurian (Romance language)", -- Ligurian; see Template_talk:Lang#Ligurian_dab ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ['qwm'] = "Kuman (Russia)", -- Kuman (Russia); to avoid Kuman dab page ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["toi"] = "Tonga language (Zambia and Zimbabwe)", -- Tonga (Zambia and Zimbabwe); to avoid Tonga language dab page ["vwa"] = "Awa language (China)", -- Awa (China); to avoid Awa dab page ["xlg"] = "Ligurian (ancient language)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['pny'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, }; return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; 21c8141ea9d590d8db51d505f22d6ef0554cc75d Module:Language/data/iana languages 828 95 264 263 2024-02-07T02:44:09Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Language/data/iana_languages]] Scribunto text/plain -- File-Date: 2023-10-16 local active = { ["aa"] = {"Afar"}, ["ab"] = {"Abkhazian"}, ["ae"] = {"Avestan"}, ["af"] = {"Afrikaans"}, ["ak"] = {"Akan"}, ["am"] = {"Amharic"}, ["an"] = {"Aragonese"}, ["ar"] = {"Arabic"}, ["as"] = {"Assamese"}, ["av"] = {"Avaric"}, ["ay"] = {"Aymara"}, ["az"] = {"Azerbaijani"}, ["ba"] = {"Bashkir"}, ["be"] = {"Belarusian"}, ["bg"] = {"Bulgarian"}, ["bh"] = {"Bihari languages"}, ["bi"] = {"Bislama"}, ["bm"] = {"Bambara"}, ["bn"] = {"Bengali", "Bangla"}, ["bo"] = {"Tibetan"}, ["br"] = {"Breton"}, ["bs"] = {"Bosnian"}, ["ca"] = {"Catalan", "Valencian"}, ["ce"] = {"Chechen"}, ["ch"] = {"Chamorro"}, ["co"] = {"Corsican"}, ["cr"] = {"Cree"}, ["cs"] = {"Czech"}, ["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"}, ["cv"] = {"Chuvash"}, ["cy"] = {"Welsh"}, ["da"] = {"Danish"}, ["de"] = {"German"}, ["dv"] = {"Dhivehi", "Divehi", "Maldivian"}, ["dz"] = {"Dzongkha"}, ["ee"] = {"Ewe"}, ["el"] = {"Modern Greek (1453-)"}, ["en"] = {"English"}, ["eo"] = {"Esperanto"}, ["es"] = {"Spanish", "Castilian"}, ["et"] = {"Estonian"}, ["eu"] = {"Basque"}, ["fa"] = {"Persian"}, ["ff"] = {"Fulah"}, ["fi"] = {"Finnish"}, ["fj"] = {"Fijian"}, ["fo"] = {"Faroese"}, ["fr"] = {"French"}, ["fy"] = {"Western Frisian"}, ["ga"] = {"Irish"}, ["gd"] = {"Scottish Gaelic", "Gaelic"}, ["gl"] = {"Galician"}, ["gn"] = {"Guarani"}, ["gu"] = {"Gujarati"}, ["gv"] = {"Manx"}, ["ha"] = {"Hausa"}, ["he"] = {"Hebrew"}, ["hi"] = {"Hindi"}, ["ho"] = {"Hiri Motu"}, ["hr"] = {"Croatian"}, ["ht"] = {"Haitian", "Haitian Creole"}, ["hu"] = {"Hungarian"}, ["hy"] = {"Armenian"}, ["hz"] = {"Herero"}, ["ia"] = {"Interlingua (International Auxiliary Language Association)"}, ["id"] = {"Indonesian"}, ["ie"] = {"Interlingue", "Occidental"}, ["ig"] = {"Igbo"}, ["ii"] = {"Sichuan Yi", "Nuosu"}, ["ik"] = {"Inupiaq"}, ["io"] = {"Ido"}, ["is"] = {"Icelandic"}, ["it"] = {"Italian"}, ["iu"] = {"Inuktitut"}, ["ja"] = {"Japanese"}, ["jv"] = {"Javanese"}, ["ka"] = {"Georgian"}, ["kg"] = {"Kongo"}, ["ki"] = {"Kikuyu", "Gikuyu"}, ["kj"] = {"Kuanyama", "Kwanyama"}, ["kk"] = {"Kazakh"}, ["kl"] = {"Kalaallisut", "Greenlandic"}, ["km"] = {"Khmer", "Central Khmer"}, ["kn"] = {"Kannada"}, ["ko"] = {"Korean"}, ["kr"] = {"Kanuri"}, ["ks"] = {"Kashmiri"}, ["ku"] = {"Kurdish"}, ["kv"] = {"Komi"}, ["kw"] = {"Cornish"}, ["ky"] = {"Kirghiz", "Kyrgyz"}, ["la"] = {"Latin"}, ["lb"] = {"Luxembourgish", "Letzeburgesch"}, ["lg"] = {"Ganda", "Luganda"}, ["li"] = {"Limburgan", "Limburger", "Limburgish"}, ["ln"] = {"Lingala"}, ["lo"] = {"Lao"}, ["lt"] = {"Lithuanian"}, ["lu"] = {"Luba-Katanga"}, ["lv"] = {"Latvian"}, ["mg"] = {"Malagasy"}, ["mh"] = {"Marshallese"}, ["mi"] = {"Maori"}, ["mk"] = {"Macedonian"}, ["ml"] = {"Malayalam"}, ["mn"] = {"Mongolian"}, ["mr"] = {"Marathi"}, ["ms"] = {"Malay (macrolanguage)"}, ["mt"] = {"Maltese"}, ["my"] = {"Burmese"}, ["na"] = {"Nauru"}, ["nb"] = {"Norwegian Bokmål"}, ["nd"] = {"North Ndebele"}, ["ne"] = {"Nepali (macrolanguage)"}, ["ng"] = {"Ndonga"}, ["nl"] = {"Dutch", "Flemish"}, ["nn"] = {"Norwegian Nynorsk"}, ["no"] = {"Norwegian"}, ["nr"] = {"South Ndebele"}, ["nv"] = {"Navajo", "Navaho"}, ["ny"] = {"Nyanja", "Chewa", "Chichewa"}, ["oc"] = {"Occitan (post 1500)"}, ["oj"] = {"Ojibwa"}, ["om"] = {"Oromo"}, ["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"}, ["os"] = {"Ossetian", "Ossetic"}, ["pa"] = {"Panjabi", "Punjabi"}, ["pi"] = {"Pali"}, ["pl"] = {"Polish"}, ["ps"] = {"Pushto", "Pashto"}, ["pt"] = {"Portuguese"}, ["qu"] = {"Quechua"}, ["rm"] = {"Romansh"}, ["rn"] = {"Rundi"}, ["ro"] = {"Romanian", "Moldavian", "Moldovan"}, ["ru"] = {"Russian"}, ["rw"] = {"Kinyarwanda"}, ["sa"] = {"Sanskrit"}, ["sc"] = {"Sardinian"}, ["sd"] = {"Sindhi"}, ["se"] = {"Northern Sami"}, ["sg"] = {"Sango"}, ["sh"] = {"Serbo-Croatian"}, ["si"] = {"Sinhala", "Sinhalese"}, ["sk"] = {"Slovak"}, ["sl"] = {"Slovenian"}, ["sm"] = {"Samoan"}, ["sn"] = {"Shona"}, ["so"] = {"Somali"}, ["sq"] = {"Albanian"}, ["sr"] = {"Serbian"}, ["ss"] = {"Swati"}, ["st"] = {"Southern Sotho"}, ["su"] = {"Sundanese"}, ["sv"] = {"Swedish"}, ["sw"] = {"Swahili (macrolanguage)"}, ["ta"] = {"Tamil"}, ["te"] = {"Telugu"}, ["tg"] = {"Tajik"}, ["th"] = {"Thai"}, ["ti"] = {"Tigrinya"}, ["tk"] = {"Turkmen"}, ["tl"] = {"Tagalog"}, ["tn"] = {"Tswana"}, ["to"] = {"Tonga (Tonga Islands)"}, ["tr"] = {"Turkish"}, ["ts"] = {"Tsonga"}, ["tt"] = {"Tatar"}, ["tw"] = {"Twi"}, ["ty"] = {"Tahitian"}, ["ug"] = {"Uighur", "Uyghur"}, ["uk"] = {"Ukrainian"}, ["ur"] = {"Urdu"}, ["uz"] = {"Uzbek"}, ["ve"] = {"Venda"}, ["vi"] = {"Vietnamese"}, ["vo"] = {"Volapük"}, ["wa"] = {"Walloon"}, ["wo"] = {"Wolof"}, ["xh"] = {"Xhosa"}, ["yi"] = {"Yiddish"}, ["yo"] = {"Yoruba"}, ["za"] = {"Zhuang", "Chuang"}, ["zh"] = {"Chinese"}, ["zu"] = {"Zulu"}, ["aaa"] = {"Ghotuo"}, ["aab"] = {"Alumu-Tesu"}, ["aac"] = {"Ari"}, ["aad"] = {"Amal"}, ["aae"] = {"Arbëreshë Albanian"}, ["aaf"] = {"Aranadan"}, ["aag"] = {"Ambrak"}, ["aah"] = {"Abu' Arapesh"}, ["aai"] = {"Arifama-Miniafia"}, ["aak"] = {"Ankave"}, ["aal"] = {"Afade"}, ["aan"] = {"Anambé"}, ["aao"] = {"Algerian Saharan Arabic"}, ["aap"] = {"Pará Arára"}, ["aaq"] = {"Eastern Abnaki"}, ["aas"] = {"Aasáx"}, ["aat"] = {"Arvanitika Albanian"}, ["aau"] = {"Abau"}, ["aav"] = {"Austro-Asiatic languages"}, ["aaw"] = {"Solong"}, ["aax"] = {"Mandobo Atas"}, ["aaz"] = {"Amarasi"}, ["aba"] = {"Abé"}, ["abb"] = {"Bankon"}, ["abc"] = {"Ambala Ayta"}, ["abd"] = {"Manide"}, ["abe"] = {"Western Abnaki"}, ["abf"] = {"Abai Sungai"}, ["abg"] = {"Abaga"}, ["abh"] = {"Tajiki Arabic"}, ["abi"] = {"Abidji"}, ["abj"] = {"Aka-Bea"}, ["abl"] = {"Lampung Nyo"}, ["abm"] = {"Abanyom"}, ["abn"] = {"Abua"}, ["abo"] = {"Abon"}, ["abp"] = {"Abellen Ayta"}, ["abq"] = {"Abaza"}, ["abr"] = {"Abron"}, ["abs"] = {"Ambonese Malay"}, ["abt"] = {"Ambulas"}, ["abu"] = {"Abure"}, ["abv"] = {"Baharna Arabic"}, ["abw"] = {"Pal"}, ["abx"] = {"Inabaknon"}, ["aby"] = {"Aneme Wake"}, ["abz"] = {"Abui"}, ["aca"] = {"Achagua"}, ["acb"] = {"Áncá"}, ["acd"] = {"Gikyode"}, ["ace"] = {"Achinese"}, ["acf"] = {"Saint Lucian Creole French"}, ["ach"] = {"Acoli"}, ["aci"] = {"Aka-Cari"}, ["ack"] = {"Aka-Kora"}, ["acl"] = {"Akar-Bale"}, ["acm"] = {"Mesopotamian Arabic"}, ["acn"] = {"Achang"}, ["acp"] = {"Eastern Acipa"}, ["acq"] = {"Ta'izzi-Adeni Arabic"}, ["acr"] = {"Achi"}, ["acs"] = {"Acroá"}, ["act"] = {"Achterhoeks"}, ["acu"] = {"Achuar-Shiwiar"}, ["acv"] = {"Achumawi"}, ["acw"] = {"Hijazi Arabic"}, ["acx"] = {"Omani Arabic"}, ["acy"] = {"Cypriot Arabic"}, ["acz"] = {"Acheron"}, ["ada"] = {"Adangme"}, ["adb"] = {"Atauran"}, ["add"] = {"Lidzonka", "Dzodinka"}, ["ade"] = {"Adele"}, ["adf"] = {"Dhofari Arabic"}, ["adg"] = {"Andegerebinha"}, ["adh"] = {"Adhola"}, ["adi"] = {"Adi"}, ["adj"] = {"Adioukrou"}, ["adl"] = {"Galo"}, ["adn"] = {"Adang"}, ["ado"] = {"Abu"}, ["adq"] = {"Adangbe"}, ["adr"] = {"Adonara"}, ["ads"] = {"Adamorobe Sign Language"}, ["adt"] = {"Adnyamathanha"}, ["adu"] = {"Aduge"}, ["adw"] = {"Amundava"}, ["adx"] = {"Amdo Tibetan"}, ["ady"] = {"Adyghe", "Adygei"}, ["adz"] = {"Adzera"}, ["aea"] = {"Areba"}, ["aeb"] = {"Tunisian Arabic"}, ["aec"] = {"Saidi Arabic"}, ["aed"] = {"Argentine Sign Language"}, ["aee"] = {"Northeast Pashai", "Northeast Pashayi"}, ["aek"] = {"Haeke"}, ["ael"] = {"Ambele"}, ["aem"] = {"Arem"}, ["aen"] = {"Armenian Sign Language"}, ["aeq"] = {"Aer"}, ["aer"] = {"Eastern Arrernte"}, ["aes"] = {"Alsea"}, ["aeu"] = {"Akeu"}, ["aew"] = {"Ambakich"}, ["aey"] = {"Amele"}, ["aez"] = {"Aeka"}, ["afa"] = {"Afro-Asiatic languages"}, ["afb"] = {"Gulf Arabic"}, ["afd"] = {"Andai"}, ["afe"] = {"Putukwam"}, ["afg"] = {"Afghan Sign Language"}, ["afh"] = {"Afrihili"}, ["afi"] = {"Akrukay", "Chini"}, ["afk"] = {"Nanubae"}, ["afn"] = {"Defaka"}, ["afo"] = {"Eloyi"}, ["afp"] = {"Tapei"}, ["afs"] = {"Afro-Seminole Creole"}, ["aft"] = {"Afitti"}, ["afu"] = {"Awutu"}, ["afz"] = {"Obokuitai"}, ["aga"] = {"Aguano"}, ["agb"] = {"Legbo"}, ["agc"] = {"Agatu"}, ["agd"] = {"Agarabi"}, ["age"] = {"Angal"}, ["agf"] = {"Arguni"}, ["agg"] = {"Angor"}, ["agh"] = {"Ngelima"}, ["agi"] = {"Agariya"}, ["agj"] = {"Argobba"}, ["agk"] = {"Isarog Agta"}, ["agl"] = {"Fembe"}, ["agm"] = {"Angaataha"}, ["agn"] = {"Agutaynen"}, ["ago"] = {"Tainae"}, ["agq"] = {"Aghem"}, ["agr"] = {"Aguaruna"}, ["ags"] = {"Esimbi"}, ["agt"] = {"Central Cagayan Agta"}, ["agu"] = {"Aguacateco"}, ["agv"] = {"Remontado Dumagat"}, ["agw"] = {"Kahua"}, ["agx"] = {"Aghul"}, ["agy"] = {"Southern Alta"}, ["agz"] = {"Mt. Iriga Agta"}, ["aha"] = {"Ahanta"}, ["ahb"] = {"Axamb"}, ["ahg"] = {"Qimant"}, ["ahh"] = {"Aghu"}, ["ahi"] = {"Tiagbamrin Aizi"}, ["ahk"] = {"Akha"}, ["ahl"] = {"Igo"}, ["ahm"] = {"Mobumrin Aizi"}, ["ahn"] = {"Àhàn"}, ["aho"] = {"Ahom"}, ["ahp"] = {"Aproumu Aizi"}, ["ahr"] = {"Ahirani"}, ["ahs"] = {"Ashe"}, ["aht"] = {"Ahtena"}, ["aia"] = {"Arosi"}, ["aib"] = {"Ainu (China)"}, ["aic"] = {"Ainbai"}, ["aid"] = {"Alngith"}, ["aie"] = {"Amara"}, ["aif"] = {"Agi"}, ["aig"] = {"Antigua and Barbuda Creole English"}, ["aih"] = {"Ai-Cham"}, ["aii"] = {"Assyrian Neo-Aramaic"}, ["aij"] = {"Lishanid Noshan"}, ["aik"] = {"Ake"}, ["ail"] = {"Aimele"}, ["aim"] = {"Aimol"}, ["ain"] = {"Ainu (Japan)"}, ["aio"] = {"Aiton"}, ["aip"] = {"Burumakok"}, ["aiq"] = {"Aimaq"}, ["air"] = {"Airoran"}, ["ait"] = {"Arikem"}, ["aiw"] = {"Aari"}, ["aix"] = {"Aighon"}, ["aiy"] = {"Ali"}, ["aja"] = {"Aja (South Sudan)"}, ["ajg"] = {"Aja (Benin)"}, ["aji"] = {"Ajië"}, ["ajn"] = {"Andajin"}, ["ajs"] = {"Algerian Jewish Sign Language"}, ["aju"] = {"Judeo-Moroccan Arabic"}, ["ajw"] = {"Ajawa"}, ["ajz"] = {"Amri Karbi"}, ["akb"] = {"Batak Angkola"}, ["akc"] = {"Mpur"}, ["akd"] = {"Ukpet-Ehom"}, ["ake"] = {"Akawaio"}, ["akf"] = {"Akpa"}, ["akg"] = {"Anakalangu"}, ["akh"] = {"Angal Heneng"}, ["aki"] = {"Aiome"}, ["akj"] = {"Aka-Jeru"}, ["akk"] = {"Akkadian"}, ["akl"] = {"Aklanon"}, ["akm"] = {"Aka-Bo"}, ["ako"] = {"Akurio"}, ["akp"] = {"Siwu"}, ["akq"] = {"Ak"}, ["akr"] = {"Araki"}, ["aks"] = {"Akaselem"}, ["akt"] = {"Akolet"}, ["aku"] = {"Akum"}, ["akv"] = {"Akhvakh"}, ["akw"] = {"Akwa"}, ["akx"] = {"Aka-Kede"}, ["aky"] = {"Aka-Kol"}, ["akz"] = {"Alabama"}, ["ala"] = {"Alago"}, ["alc"] = {"Qawasqar"}, ["ald"] = {"Alladian"}, ["ale"] = {"Aleut"}, ["alf"] = {"Alege"}, ["alg"] = {"Algonquian languages"}, ["alh"] = {"Alawa"}, ["ali"] = {"Amaimon"}, ["alj"] = {"Alangan"}, ["alk"] = {"Alak"}, ["all"] = {"Allar"}, ["alm"] = {"Amblong"}, ["aln"] = {"Gheg Albanian"}, ["alo"] = {"Larike-Wakasihu"}, ["alp"] = {"Alune"}, ["alq"] = {"Algonquin"}, ["alr"] = {"Alutor"}, ["als"] = {"Tosk Albanian"}, ["alt"] = {"Southern Altai"}, ["alu"] = {"'Are'are"}, ["alv"] = {"Atlantic-Congo languages"}, ["alw"] = {"Alaba-K’abeena", "Wanbasana"}, ["alx"] = {"Amol"}, ["aly"] = {"Alyawarr"}, ["alz"] = {"Alur"}, ["ama"] = {"Amanayé"}, ["amb"] = {"Ambo"}, ["amc"] = {"Amahuaca"}, ["ame"] = {"Yanesha'"}, ["amf"] = {"Hamer-Banna"}, ["amg"] = {"Amurdak"}, ["ami"] = {"Amis"}, ["amj"] = {"Amdang"}, ["amk"] = {"Ambai"}, ["aml"] = {"War-Jaintia"}, ["amm"] = {"Ama (Papua New Guinea)"}, ["amn"] = {"Amanab"}, ["amo"] = {"Amo"}, ["amp"] = {"Alamblak"}, ["amq"] = {"Amahai"}, ["amr"] = {"Amarakaeri"}, ["ams"] = {"Southern Amami-Oshima"}, ["amt"] = {"Amto"}, ["amu"] = {"Guerrero Amuzgo"}, ["amv"] = {"Ambelau"}, ["amw"] = {"Western Neo-Aramaic"}, ["amx"] = {"Anmatyerre"}, ["amy"] = {"Ami"}, ["amz"] = {"Atampaya"}, ["ana"] = {"Andaqui"}, ["anb"] = {"Andoa"}, ["anc"] = {"Ngas"}, ["and"] = {"Ansus"}, ["ane"] = {"Xârâcùù"}, ["anf"] = {"Animere"}, ["ang"] = {"Old English (ca. 450-1100)"}, ["anh"] = {"Nend"}, ["ani"] = {"Andi"}, ["anj"] = {"Anor"}, ["ank"] = {"Goemai"}, ["anl"] = {"Anu-Hkongso Chin"}, ["anm"] = {"Anal"}, ["ann"] = {"Obolo"}, ["ano"] = {"Andoque"}, ["anp"] = {"Angika"}, ["anq"] = {"Jarawa (India)"}, ["anr"] = {"Andh"}, ["ans"] = {"Anserma"}, ["ant"] = {"Antakarinya", "Antikarinya"}, ["anu"] = {"Anuak"}, ["anv"] = {"Denya"}, ["anw"] = {"Anaang"}, ["anx"] = {"Andra-Hus"}, ["any"] = {"Anyin"}, ["anz"] = {"Anem"}, ["aoa"] = {"Angolar"}, ["aob"] = {"Abom"}, ["aoc"] = {"Pemon"}, ["aod"] = {"Andarum"}, ["aoe"] = {"Angal Enen"}, ["aof"] = {"Bragat"}, ["aog"] = {"Angoram"}, ["aoi"] = {"Anindilyakwa"}, ["aoj"] = {"Mufian"}, ["aok"] = {"Arhö"}, ["aol"] = {"Alor"}, ["aom"] = {"Ömie"}, ["aon"] = {"Bumbita Arapesh"}, ["aor"] = {"Aore"}, ["aos"] = {"Taikat"}, ["aot"] = {"Atong (India)", "A'tong"}, ["aou"] = {"A'ou"}, ["aox"] = {"Atorada"}, ["aoz"] = {"Uab Meto"}, ["apa"] = {"Apache languages"}, ["apb"] = {"Sa'a"}, ["apc"] = {"Levantine Arabic"}, ["apd"] = {"Sudanese Arabic"}, ["ape"] = {"Bukiyip"}, ["apf"] = {"Pahanan Agta"}, ["apg"] = {"Ampanang"}, ["aph"] = {"Athpariya"}, ["api"] = {"Apiaká"}, ["apj"] = {"Jicarilla Apache"}, ["apk"] = {"Kiowa Apache"}, ["apl"] = {"Lipan Apache"}, ["apm"] = {"Mescalero-Chiricahua Apache"}, ["apn"] = {"Apinayé"}, ["apo"] = {"Ambul"}, ["app"] = {"Apma"}, ["apq"] = {"A-Pucikwar"}, ["apr"] = {"Arop-Lokep"}, ["aps"] = {"Arop-Sissano"}, ["apt"] = {"Apatani"}, ["apu"] = {"Apurinã"}, ["apv"] = {"Alapmunte"}, ["apw"] = {"Western Apache"}, ["apx"] = {"Aputai"}, ["apy"] = {"Apalaí"}, ["apz"] = {"Safeyoka"}, ["aqa"] = {"Alacalufan languages"}, ["aqc"] = {"Archi"}, ["aqd"] = {"Ampari Dogon"}, ["aqg"] = {"Arigidi"}, ["aqk"] = {"Aninka"}, ["aql"] = {"Algic languages"}, ["aqm"] = {"Atohwaim"}, ["aqn"] = {"Northern Alta"}, ["aqp"] = {"Atakapa"}, ["aqr"] = {"Arhâ"}, ["aqt"] = {"Angaité"}, ["aqz"] = {"Akuntsu"}, ["arb"] = {"Standard Arabic"}, ["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"}, ["ard"] = {"Arabana"}, ["are"] = {"Western Arrarnta"}, ["arh"] = {"Arhuaco"}, ["ari"] = {"Arikara"}, ["arj"] = {"Arapaso"}, ["ark"] = {"Arikapú"}, ["arl"] = {"Arabela"}, ["arn"] = {"Mapudungun", "Mapuche"}, ["aro"] = {"Araona"}, ["arp"] = {"Arapaho"}, ["arq"] = {"Algerian Arabic"}, ["arr"] = {"Karo (Brazil)"}, ["ars"] = {"Najdi Arabic"}, ["art"] = {"Artificial languages"}, ["aru"] = {"Aruá (Amazonas State)", "Arawá"}, ["arv"] = {"Arbore"}, ["arw"] = {"Arawak"}, ["arx"] = {"Aruá (Rodonia State)"}, ["ary"] = {"Moroccan Arabic"}, ["arz"] = {"Egyptian Arabic"}, ["asa"] = {"Asu (Tanzania)"}, ["asb"] = {"Assiniboine"}, ["asc"] = {"Casuarina Coast Asmat"}, ["ase"] = {"American Sign Language"}, ["asf"] = {"Auslan", "Australian Sign Language"}, ["asg"] = {"Cishingini"}, ["ash"] = {"Abishira"}, ["asi"] = {"Buruwai"}, ["asj"] = {"Sari"}, ["ask"] = {"Ashkun"}, ["asl"] = {"Asilulu"}, ["asn"] = {"Xingú Asuriní"}, ["aso"] = {"Dano"}, ["asp"] = {"Algerian Sign Language"}, ["asq"] = {"Austrian Sign Language"}, ["asr"] = {"Asuri"}, ["ass"] = {"Ipulo"}, ["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"}, ["asu"] = {"Tocantins Asurini"}, ["asv"] = {"Asoa"}, ["asw"] = {"Australian Aborigines Sign Language"}, ["asx"] = {"Muratayak"}, ["asy"] = {"Yaosakor Asmat"}, ["asz"] = {"As"}, ["ata"] = {"Pele-Ata"}, ["atb"] = {"Zaiwa"}, ["atc"] = {"Atsahuaca"}, ["atd"] = {"Ata Manobo"}, ["ate"] = {"Atemble"}, ["atg"] = {"Ivbie North-Okpela-Arhe"}, ["ath"] = {"Athapascan languages"}, ["ati"] = {"Attié"}, ["atj"] = {"Atikamekw"}, ["atk"] = {"Ati"}, ["atl"] = {"Mt. Iraya Agta"}, ["atm"] = {"Ata"}, ["atn"] = {"Ashtiani"}, ["ato"] = {"Atong (Cameroon)"}, ["atp"] = {"Pudtol Atta"}, ["atq"] = {"Aralle-Tabulahan"}, ["atr"] = {"Waimiri-Atroari"}, ["ats"] = {"Gros Ventre"}, ["att"] = {"Pamplona Atta"}, ["atu"] = {"Reel"}, ["atv"] = {"Northern Altai"}, ["atw"] = {"Atsugewi"}, ["atx"] = {"Arutani"}, ["aty"] = {"Aneityum"}, ["atz"] = {"Arta"}, ["aua"] = {"Asumboa"}, ["aub"] = {"Alugu"}, ["auc"] = {"Waorani"}, ["aud"] = {"Anuta"}, ["auf"] = {"Arauan languages"}, ["aug"] = {"Aguna"}, ["auh"] = {"Aushi"}, ["aui"] = {"Anuki"}, ["auj"] = {"Awjilah"}, ["auk"] = {"Heyo"}, ["aul"] = {"Aulua"}, ["aum"] = {"Asu (Nigeria)"}, ["aun"] = {"Molmo One"}, ["auo"] = {"Auyokawa"}, ["aup"] = {"Makayam"}, ["auq"] = {"Anus", "Korur"}, ["aur"] = {"Aruek"}, ["aus"] = {"Australian languages"}, ["aut"] = {"Austral"}, ["auu"] = {"Auye"}, ["auw"] = {"Awyi"}, ["aux"] = {"Aurá"}, ["auy"] = {"Awiyaana"}, ["auz"] = {"Uzbeki Arabic"}, ["avb"] = {"Avau"}, ["avd"] = {"Alviri-Vidari"}, ["avi"] = {"Avikam"}, ["avk"] = {"Kotava"}, ["avl"] = {"Eastern Egyptian Bedawi Arabic"}, ["avm"] = {"Angkamuthi"}, ["avn"] = {"Avatime"}, ["avo"] = {"Agavotaguerra"}, ["avs"] = {"Aushiri"}, ["avt"] = {"Au"}, ["avu"] = {"Avokaya"}, ["avv"] = {"Avá-Canoeiro"}, ["awa"] = {"Awadhi"}, ["awb"] = {"Awa (Papua New Guinea)"}, ["awc"] = {"Cicipu"}, ["awd"] = {"Arawakan languages"}, ["awe"] = {"Awetí"}, ["awg"] = {"Anguthimri"}, ["awh"] = {"Awbono"}, ["awi"] = {"Aekyom"}, ["awk"] = {"Awabakal"}, ["awm"] = {"Arawum"}, ["awn"] = {"Awngi"}, ["awo"] = {"Awak"}, ["awr"] = {"Awera"}, ["aws"] = {"South Awyu"}, ["awt"] = {"Araweté"}, ["awu"] = {"Central Awyu"}, ["awv"] = {"Jair Awyu"}, ["aww"] = {"Awun"}, ["awx"] = {"Awara"}, ["awy"] = {"Edera Awyu"}, ["axb"] = {"Abipon"}, ["axe"] = {"Ayerrerenge"}, ["axg"] = {"Mato Grosso Arára"}, ["axk"] = {"Yaka (Central African Republic)"}, ["axl"] = {"Lower Southern Aranda"}, ["axm"] = {"Middle Armenian"}, ["axx"] = {"Xârâgurè"}, ["aya"] = {"Awar"}, ["ayb"] = {"Ayizo Gbe"}, ["ayc"] = {"Southern Aymara"}, ["ayd"] = {"Ayabadhu"}, ["aye"] = {"Ayere"}, ["ayg"] = {"Ginyanga"}, ["ayh"] = {"Hadrami Arabic"}, ["ayi"] = {"Leyigha"}, ["ayk"] = {"Akuku"}, ["ayl"] = {"Libyan Arabic"}, ["ayn"] = {"Sanaani Arabic"}, ["ayo"] = {"Ayoreo"}, ["ayp"] = {"North Mesopotamian Arabic"}, ["ayq"] = {"Ayi (Papua New Guinea)"}, ["ayr"] = {"Central Aymara"}, ["ays"] = {"Sorsogon Ayta"}, ["ayt"] = {"Magbukun Ayta"}, ["ayu"] = {"Ayu"}, ["ayz"] = {"Mai Brat"}, ["aza"] = {"Azha"}, ["azb"] = {"South Azerbaijani"}, ["azc"] = {"Uto-Aztecan languages"}, ["azd"] = {"Eastern Durango Nahuatl"}, ["azg"] = {"San Pedro Amuzgos Amuzgo"}, ["azj"] = {"North Azerbaijani"}, ["azm"] = {"Ipalapa Amuzgo"}, ["azn"] = {"Western Durango Nahuatl"}, ["azo"] = {"Awing"}, ["azt"] = {"Faire Atta"}, ["azz"] = {"Highland Puebla Nahuatl"}, ["baa"] = {"Babatana"}, ["bab"] = {"Bainouk-Gunyuño"}, ["bac"] = {"Badui"}, ["bad"] = {"Banda languages"}, ["bae"] = {"Baré"}, ["baf"] = {"Nubaca"}, ["bag"] = {"Tuki"}, ["bah"] = {"Bahamas Creole English"}, ["bai"] = {"Bamileke languages"}, ["baj"] = {"Barakai"}, ["bal"] = {"Baluchi"}, ["ban"] = {"Balinese"}, ["bao"] = {"Waimaha"}, ["bap"] = {"Bantawa"}, ["bar"] = {"Bavarian"}, ["bas"] = {"Basa (Cameroon)"}, ["bat"] = {"Baltic languages"}, ["bau"] = {"Bada (Nigeria)"}, ["bav"] = {"Vengo"}, ["baw"] = {"Bambili-Bambui"}, ["bax"] = {"Bamun"}, ["bay"] = {"Batuley"}, ["bba"] = {"Baatonum"}, ["bbb"] = {"Barai"}, ["bbc"] = {"Batak Toba"}, ["bbd"] = {"Bau"}, ["bbe"] = {"Bangba"}, ["bbf"] = {"Baibai"}, ["bbg"] = {"Barama"}, ["bbh"] = {"Bugan"}, ["bbi"] = {"Barombi"}, ["bbj"] = {"Ghomálá'"}, ["bbk"] = {"Babanki"}, ["bbl"] = {"Bats"}, ["bbm"] = {"Babango"}, ["bbn"] = {"Uneapa"}, ["bbo"] = {"Northern Bobo Madaré", "Konabéré"}, ["bbp"] = {"West Central Banda"}, ["bbq"] = {"Bamali"}, ["bbr"] = {"Girawa"}, ["bbs"] = {"Bakpinka"}, ["bbt"] = {"Mburku"}, ["bbu"] = {"Kulung (Nigeria)"}, ["bbv"] = {"Karnai"}, ["bbw"] = {"Baba"}, ["bbx"] = {"Bubia"}, ["bby"] = {"Befang"}, ["bca"] = {"Central Bai"}, ["bcb"] = {"Bainouk-Samik"}, ["bcc"] = {"Southern Balochi"}, ["bcd"] = {"North Babar"}, ["bce"] = {"Bamenyam"}, ["bcf"] = {"Bamu"}, ["bcg"] = {"Baga Pokur"}, ["bch"] = {"Bariai"}, ["bci"] = {"Baoulé"}, ["bcj"] = {"Bardi"}, ["bck"] = {"Bunuba"}, ["bcl"] = {"Central Bikol"}, ["bcm"] = {"Bannoni"}, ["bcn"] = {"Bali (Nigeria)"}, ["bco"] = {"Kaluli"}, ["bcp"] = {"Bali (Democratic Republic of Congo)"}, ["bcq"] = {"Bench"}, ["bcr"] = {"Babine"}, ["bcs"] = {"Kohumono"}, ["bct"] = {"Bendi"}, ["bcu"] = {"Awad Bing"}, ["bcv"] = {"Shoo-Minda-Nye"}, ["bcw"] = {"Bana"}, ["bcy"] = {"Bacama"}, ["bcz"] = {"Bainouk-Gunyaamolo"}, ["bda"] = {"Bayot"}, ["bdb"] = {"Basap"}, ["bdc"] = {"Emberá-Baudó"}, ["bdd"] = {"Bunama"}, ["bde"] = {"Bade"}, ["bdf"] = {"Biage"}, ["bdg"] = {"Bonggi"}, ["bdh"] = {"Baka (South Sudan)"}, ["bdi"] = {"Burun"}, ["bdj"] = {"Bai (South Sudan)", "Bai"}, ["bdk"] = {"Budukh"}, ["bdl"] = {"Indonesian Bajau"}, ["bdm"] = {"Buduma"}, ["bdn"] = {"Baldemu"}, ["bdo"] = {"Morom"}, ["bdp"] = {"Bende"}, ["bdq"] = {"Bahnar"}, ["bdr"] = {"West Coast Bajau"}, ["bds"] = {"Burunge"}, ["bdt"] = {"Bokoto"}, ["bdu"] = {"Oroko"}, ["bdv"] = {"Bodo Parja"}, ["bdw"] = {"Baham"}, ["bdx"] = {"Budong-Budong"}, ["bdy"] = {"Bandjalang"}, ["bdz"] = {"Badeshi"}, ["bea"] = {"Beaver"}, ["beb"] = {"Bebele"}, ["bec"] = {"Iceve-Maci"}, ["bed"] = {"Bedoanas"}, ["bee"] = {"Byangsi"}, ["bef"] = {"Benabena"}, ["beg"] = {"Belait"}, ["beh"] = {"Biali"}, ["bei"] = {"Bekati'"}, ["bej"] = {"Beja", "Bedawiyet"}, ["bek"] = {"Bebeli"}, ["bem"] = {"Bemba (Zambia)"}, ["beo"] = {"Beami"}, ["bep"] = {"Besoa"}, ["beq"] = {"Beembe"}, ["ber"] = {"Berber languages"}, ["bes"] = {"Besme"}, ["bet"] = {"Guiberoua Béte"}, ["beu"] = {"Blagar"}, ["bev"] = {"Daloa Bété"}, ["bew"] = {"Betawi"}, ["bex"] = {"Jur Modo"}, ["bey"] = {"Beli (Papua New Guinea)"}, ["bez"] = {"Bena (Tanzania)"}, ["bfa"] = {"Bari"}, ["bfb"] = {"Pauri Bareli"}, ["bfc"] = {"Panyi Bai", "Northern Bai"}, ["bfd"] = {"Bafut"}, ["bfe"] = {"Betaf", "Tena"}, ["bff"] = {"Bofi"}, ["bfg"] = {"Busang Kayan"}, ["bfh"] = {"Blafe"}, ["bfi"] = {"British Sign Language"}, ["bfj"] = {"Bafanji"}, ["bfk"] = {"Ban Khor Sign Language"}, ["bfl"] = {"Banda-Ndélé"}, ["bfm"] = {"Mmen"}, ["bfn"] = {"Bunak"}, ["bfo"] = {"Malba Birifor"}, ["bfp"] = {"Beba"}, ["bfq"] = {"Badaga"}, ["bfr"] = {"Bazigar"}, ["bfs"] = {"Southern Bai"}, ["bft"] = {"Balti"}, ["bfu"] = {"Gahri"}, ["bfw"] = {"Bondo"}, ["bfx"] = {"Bantayanon"}, ["bfy"] = {"Bagheli"}, ["bfz"] = {"Mahasu Pahari"}, ["bga"] = {"Gwamhi-Wuri"}, ["bgb"] = {"Bobongko"}, ["bgc"] = {"Haryanvi"}, ["bgd"] = {"Rathwi Bareli"}, ["bge"] = {"Bauria"}, ["bgf"] = {"Bangandu"}, ["bgg"] = {"Bugun"}, ["bgi"] = {"Giangan"}, ["bgj"] = {"Bangolan"}, ["bgk"] = {"Bit", "Buxinhua"}, ["bgl"] = {"Bo (Laos)"}, ["bgn"] = {"Western Balochi"}, ["bgo"] = {"Baga Koga"}, ["bgp"] = {"Eastern Balochi"}, ["bgq"] = {"Bagri"}, ["bgr"] = {"Bawm Chin"}, ["bgs"] = {"Tagabawa"}, ["bgt"] = {"Bughotu"}, ["bgu"] = {"Mbongno"}, ["bgv"] = {"Warkay-Bipim"}, ["bgw"] = {"Bhatri"}, ["bgx"] = {"Balkan Gagauz Turkish"}, ["bgy"] = {"Benggoi"}, ["bgz"] = {"Banggai"}, ["bha"] = {"Bharia"}, ["bhb"] = {"Bhili"}, ["bhc"] = {"Biga"}, ["bhd"] = {"Bhadrawahi"}, ["bhe"] = {"Bhaya"}, ["bhf"] = {"Odiai"}, ["bhg"] = {"Binandere"}, ["bhh"] = {"Bukharic"}, ["bhi"] = {"Bhilali"}, ["bhj"] = {"Bahing"}, ["bhl"] = {"Bimin"}, ["bhm"] = {"Bathari"}, ["bhn"] = {"Bohtan Neo-Aramaic"}, ["bho"] = {"Bhojpuri"}, ["bhp"] = {"Bima"}, ["bhq"] = {"Tukang Besi South"}, ["bhr"] = {"Bara Malagasy"}, ["bhs"] = {"Buwal"}, ["bht"] = {"Bhattiyali"}, ["bhu"] = {"Bhunjia"}, ["bhv"] = {"Bahau"}, ["bhw"] = {"Biak"}, ["bhx"] = {"Bhalay"}, ["bhy"] = {"Bhele"}, ["bhz"] = {"Bada (Indonesia)"}, ["bia"] = {"Badimaya"}, ["bib"] = {"Bissa", "Bisa"}, ["bid"] = {"Bidiyo"}, ["bie"] = {"Bepour"}, ["bif"] = {"Biafada"}, ["big"] = {"Biangai"}, ["bik"] = {"Bikol"}, ["bil"] = {"Bile"}, ["bim"] = {"Bimoba"}, ["bin"] = {"Bini", "Edo"}, ["bio"] = {"Nai"}, ["bip"] = {"Bila"}, ["biq"] = {"Bipi"}, ["bir"] = {"Bisorio"}, ["bit"] = {"Berinomo"}, ["biu"] = {"Biete"}, ["biv"] = {"Southern Birifor"}, ["biw"] = {"Kol (Cameroon)"}, ["bix"] = {"Bijori"}, ["biy"] = {"Birhor"}, ["biz"] = {"Baloi"}, ["bja"] = {"Budza"}, ["bjb"] = {"Banggarla"}, ["bjc"] = {"Bariji"}, ["bje"] = {"Biao-Jiao Mien"}, ["bjf"] = {"Barzani Jewish Neo-Aramaic"}, ["bjg"] = {"Bidyogo"}, ["bjh"] = {"Bahinemo"}, ["bji"] = {"Burji"}, ["bjj"] = {"Kanauji"}, ["bjk"] = {"Barok"}, ["bjl"] = {"Bulu (Papua New Guinea)"}, ["bjm"] = {"Bajelani"}, ["bjn"] = {"Banjar"}, ["bjo"] = {"Mid-Southern Banda"}, ["bjp"] = {"Fanamaket"}, ["bjr"] = {"Binumarien"}, ["bjs"] = {"Bajan"}, ["bjt"] = {"Balanta-Ganja"}, ["bju"] = {"Busuu"}, ["bjv"] = {"Bedjond"}, ["bjw"] = {"Bakwé"}, ["bjx"] = {"Banao Itneg"}, ["bjy"] = {"Bayali"}, ["bjz"] = {"Baruga"}, ["bka"] = {"Kyak"}, ["bkc"] = {"Baka (Cameroon)"}, ["bkd"] = {"Binukid", "Talaandig"}, ["bkf"] = {"Beeke"}, ["bkg"] = {"Buraka"}, ["bkh"] = {"Bakoko"}, ["bki"] = {"Baki"}, ["bkj"] = {"Pande"}, ["bkk"] = {"Brokskat"}, ["bkl"] = {"Berik"}, ["bkm"] = {"Kom (Cameroon)"}, ["bkn"] = {"Bukitan"}, ["bko"] = {"Kwa'"}, ["bkp"] = {"Boko (Democratic Republic of Congo)"}, ["bkq"] = {"Bakairí"}, ["bkr"] = {"Bakumpai"}, ["bks"] = {"Northern Sorsoganon"}, ["bkt"] = {"Boloki"}, ["bku"] = {"Buhid"}, ["bkv"] = {"Bekwarra"}, ["bkw"] = {"Bekwel"}, ["bkx"] = {"Baikeno"}, ["bky"] = {"Bokyi"}, ["bkz"] = {"Bungku"}, ["bla"] = {"Siksika"}, ["blb"] = {"Bilua"}, ["blc"] = {"Bella Coola"}, ["bld"] = {"Bolango"}, ["ble"] = {"Balanta-Kentohe"}, ["blf"] = {"Buol"}, ["blh"] = {"Kuwaa"}, ["bli"] = {"Bolia"}, ["blj"] = {"Bolongan"}, ["blk"] = {"Pa'o Karen", "Pa'O"}, ["bll"] = {"Biloxi"}, ["blm"] = {"Beli (South Sudan)"}, ["bln"] = {"Southern Catanduanes Bikol"}, ["blo"] = {"Anii"}, ["blp"] = {"Blablanga"}, ["blq"] = {"Baluan-Pam"}, ["blr"] = {"Blang"}, ["bls"] = {"Balaesang"}, ["blt"] = {"Tai Dam"}, ["blv"] = {"Kibala", "Bolo"}, ["blw"] = {"Balangao"}, ["blx"] = {"Mag-Indi Ayta"}, ["bly"] = {"Notre"}, ["blz"] = {"Balantak"}, ["bma"] = {"Lame"}, ["bmb"] = {"Bembe"}, ["bmc"] = {"Biem"}, ["bmd"] = {"Baga Manduri"}, ["bme"] = {"Limassa"}, ["bmf"] = {"Bom-Kim"}, ["bmg"] = {"Bamwe"}, ["bmh"] = {"Kein"}, ["bmi"] = {"Bagirmi"}, ["bmj"] = {"Bote-Majhi"}, ["bmk"] = {"Ghayavi"}, ["bml"] = {"Bomboli"}, ["bmm"] = {"Northern Betsimisaraka Malagasy"}, ["bmn"] = {"Bina (Papua New Guinea)"}, ["bmo"] = {"Bambalang"}, ["bmp"] = {"Bulgebi"}, ["bmq"] = {"Bomu"}, ["bmr"] = {"Muinane"}, ["bms"] = {"Bilma Kanuri"}, ["bmt"] = {"Biao Mon"}, ["bmu"] = {"Somba-Siawari"}, ["bmv"] = {"Bum"}, ["bmw"] = {"Bomwali"}, ["bmx"] = {"Baimak"}, ["bmz"] = {"Baramu"}, ["bna"] = {"Bonerate"}, ["bnb"] = {"Bookan"}, ["bnc"] = {"Bontok"}, ["bnd"] = {"Banda (Indonesia)"}, ["bne"] = {"Bintauna"}, ["bnf"] = {"Masiwang"}, ["bng"] = {"Benga"}, ["bni"] = {"Bangi"}, ["bnj"] = {"Eastern Tawbuid"}, ["bnk"] = {"Bierebo"}, ["bnl"] = {"Boon"}, ["bnm"] = {"Batanga"}, ["bnn"] = {"Bunun"}, ["bno"] = {"Bantoanon"}, ["bnp"] = {"Bola"}, ["bnq"] = {"Bantik"}, ["bnr"] = {"Butmas-Tur"}, ["bns"] = {"Bundeli"}, ["bnt"] = {"Bantu languages"}, ["bnu"] = {"Bentong"}, ["bnv"] = {"Bonerif", "Beneraf", "Edwas"}, ["bnw"] = {"Bisis"}, ["bnx"] = {"Bangubangu"}, ["bny"] = {"Bintulu"}, ["bnz"] = {"Beezen"}, ["boa"] = {"Bora"}, ["bob"] = {"Aweer"}, ["boe"] = {"Mundabli"}, ["bof"] = {"Bolon"}, ["bog"] = {"Bamako Sign Language"}, ["boh"] = {"Boma"}, ["boi"] = {"Barbareño"}, ["boj"] = {"Anjam"}, ["bok"] = {"Bonjo"}, ["bol"] = {"Bole"}, ["bom"] = {"Berom"}, ["bon"] = {"Bine"}, ["boo"] = {"Tiemacèwè Bozo"}, ["bop"] = {"Bonkiman"}, ["boq"] = {"Bogaya"}, ["bor"] = {"Borôro"}, ["bot"] = {"Bongo"}, ["bou"] = {"Bondei"}, ["bov"] = {"Tuwuli"}, ["bow"] = {"Rema"}, ["box"] = {"Buamu"}, ["boy"] = {"Bodo (Central African Republic)"}, ["boz"] = {"Tiéyaxo Bozo"}, ["bpa"] = {"Daakaka"}, ["bpc"] = {"Mbuk"}, ["bpd"] = {"Banda-Banda"}, ["bpe"] = {"Bauni"}, ["bpg"] = {"Bonggo"}, ["bph"] = {"Botlikh"}, ["bpi"] = {"Bagupi"}, ["bpj"] = {"Binji"}, ["bpk"] = {"Orowe", "'Ôrôê"}, ["bpl"] = {"Broome Pearling Lugger Pidgin"}, ["bpm"] = {"Biyom"}, ["bpn"] = {"Dzao Min"}, ["bpo"] = {"Anasi"}, ["bpp"] = {"Kaure"}, ["bpq"] = {"Banda Malay"}, ["bpr"] = {"Koronadal Blaan"}, ["bps"] = {"Sarangani Blaan"}, ["bpt"] = {"Barrow Point"}, ["bpu"] = {"Bongu"}, ["bpv"] = {"Bian Marind"}, ["bpw"] = {"Bo (Papua New Guinea)"}, ["bpx"] = {"Palya Bareli"}, ["bpy"] = {"Bishnupriya"}, ["bpz"] = {"Bilba"}, ["bqa"] = {"Tchumbuli"}, ["bqb"] = {"Bagusa"}, ["bqc"] = {"Boko (Benin)", "Boo"}, ["bqd"] = {"Bung"}, ["bqf"] = {"Baga Kaloum"}, ["bqg"] = {"Bago-Kusuntu"}, ["bqh"] = {"Baima"}, ["bqi"] = {"Bakhtiari"}, ["bqj"] = {"Bandial"}, ["bqk"] = {"Banda-Mbrès"}, ["bql"] = {"Bilakura"}, ["bqm"] = {"Wumboko"}, ["bqn"] = {"Bulgarian Sign Language"}, ["bqo"] = {"Balo"}, ["bqp"] = {"Busa"}, ["bqq"] = {"Biritai"}, ["bqr"] = {"Burusu"}, ["bqs"] = {"Bosngun"}, ["bqt"] = {"Bamukumbit"}, ["bqu"] = {"Boguru"}, ["bqv"] = {"Koro Wachi", "Begbere-Ejar"}, ["bqw"] = {"Buru (Nigeria)"}, ["bqx"] = {"Baangi"}, ["bqy"] = {"Bengkala Sign Language"}, ["bqz"] = {"Bakaka"}, ["bra"] = {"Braj"}, ["brb"] = {"Brao", "Lave"}, ["brc"] = {"Berbice Creole Dutch"}, ["brd"] = {"Baraamu"}, ["brf"] = {"Bira"}, ["brg"] = {"Baure"}, ["brh"] = {"Brahui"}, ["bri"] = {"Mokpwe"}, ["brj"] = {"Bieria"}, ["brk"] = {"Birked"}, ["brl"] = {"Birwa"}, ["brm"] = {"Barambu"}, ["brn"] = {"Boruca"}, ["bro"] = {"Brokkat"}, ["brp"] = {"Barapasi"}, ["brq"] = {"Breri"}, ["brr"] = {"Birao"}, ["brs"] = {"Baras"}, ["brt"] = {"Bitare"}, ["bru"] = {"Eastern Bru"}, ["brv"] = {"Western Bru"}, ["brw"] = {"Bellari"}, ["brx"] = {"Bodo (India)"}, ["bry"] = {"Burui"}, ["brz"] = {"Bilbil"}, ["bsa"] = {"Abinomn"}, ["bsb"] = {"Brunei Bisaya"}, ["bsc"] = {"Bassari", "Oniyan"}, ["bse"] = {"Wushi"}, ["bsf"] = {"Bauchi"}, ["bsg"] = {"Bashkardi"}, ["bsh"] = {"Kati"}, ["bsi"] = {"Bassossi"}, ["bsj"] = {"Bangwinji"}, ["bsk"] = {"Burushaski"}, ["bsl"] = {"Basa-Gumna"}, ["bsm"] = {"Busami"}, ["bsn"] = {"Barasana-Eduria"}, ["bso"] = {"Buso"}, ["bsp"] = {"Baga Sitemu"}, ["bsq"] = {"Bassa"}, ["bsr"] = {"Bassa-Kontagora"}, ["bss"] = {"Akoose"}, ["bst"] = {"Basketo"}, ["bsu"] = {"Bahonsuai"}, ["bsv"] = {"Baga Sobané"}, ["bsw"] = {"Baiso"}, ["bsx"] = {"Yangkam"}, ["bsy"] = {"Sabah Bisaya"}, ["bta"] = {"Bata"}, ["btc"] = {"Bati (Cameroon)"}, ["btd"] = {"Batak Dairi"}, ["bte"] = {"Gamo-Ningi"}, ["btf"] = {"Birgit"}, ["btg"] = {"Gagnoa Bété"}, ["bth"] = {"Biatah Bidayuh"}, ["bti"] = {"Burate"}, ["btj"] = {"Bacanese Malay"}, ["btk"] = {"Batak languages"}, ["btm"] = {"Batak Mandailing"}, ["btn"] = {"Ratagnon"}, ["bto"] = {"Rinconada Bikol"}, ["btp"] = {"Budibud"}, ["btq"] = {"Batek"}, ["btr"] = {"Baetora"}, ["bts"] = {"Batak Simalungun"}, ["btt"] = {"Bete-Bendi"}, ["btu"] = {"Batu"}, ["btv"] = {"Bateri"}, ["btw"] = {"Butuanon"}, ["btx"] = {"Batak Karo"}, ["bty"] = {"Bobot"}, ["btz"] = {"Batak Alas-Kluet"}, ["bua"] = {"Buriat"}, ["bub"] = {"Bua"}, ["buc"] = {"Bushi"}, ["bud"] = {"Ntcham"}, ["bue"] = {"Beothuk"}, ["buf"] = {"Bushoong"}, ["bug"] = {"Buginese"}, ["buh"] = {"Younuo Bunu"}, ["bui"] = {"Bongili"}, ["buj"] = {"Basa-Gurmana"}, ["buk"] = {"Bugawac"}, ["bum"] = {"Bulu (Cameroon)"}, ["bun"] = {"Sherbro"}, ["buo"] = {"Terei"}, ["bup"] = {"Busoa"}, ["buq"] = {"Brem"}, ["bus"] = {"Bokobaru"}, ["but"] = {"Bungain"}, ["buu"] = {"Budu"}, ["buv"] = {"Bun"}, ["buw"] = {"Bubi"}, ["bux"] = {"Boghom"}, ["buy"] = {"Bullom So"}, ["buz"] = {"Bukwen"}, ["bva"] = {"Barein"}, ["bvb"] = {"Bube"}, ["bvc"] = {"Baelelea"}, ["bvd"] = {"Baeggu"}, ["bve"] = {"Berau Malay"}, ["bvf"] = {"Boor"}, ["bvg"] = {"Bonkeng"}, ["bvh"] = {"Bure"}, ["bvi"] = {"Belanda Viri"}, ["bvj"] = {"Baan"}, ["bvk"] = {"Bukat"}, ["bvl"] = {"Bolivian Sign Language"}, ["bvm"] = {"Bamunka"}, ["bvn"] = {"Buna"}, ["bvo"] = {"Bolgo"}, ["bvp"] = {"Bumang"}, ["bvq"] = {"Birri"}, ["bvr"] = {"Burarra"}, ["bvt"] = {"Bati (Indonesia)"}, ["bvu"] = {"Bukit Malay"}, ["bvv"] = {"Baniva"}, ["bvw"] = {"Boga"}, ["bvx"] = {"Dibole"}, ["bvy"] = {"Baybayanon"}, ["bvz"] = {"Bauzi"}, ["bwa"] = {"Bwatoo"}, ["bwb"] = {"Namosi-Naitasiri-Serua"}, ["bwc"] = {"Bwile"}, ["bwd"] = {"Bwaidoka"}, ["bwe"] = {"Bwe Karen"}, ["bwf"] = {"Boselewa"}, ["bwg"] = {"Barwe"}, ["bwh"] = {"Bishuo"}, ["bwi"] = {"Baniwa"}, ["bwj"] = {"Láá Láá Bwamu"}, ["bwk"] = {"Bauwaki"}, ["bwl"] = {"Bwela"}, ["bwm"] = {"Biwat"}, ["bwn"] = {"Wunai Bunu"}, ["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"}, ["bwp"] = {"Mandobo Bawah"}, ["bwq"] = {"Southern Bobo Madaré"}, ["bwr"] = {"Bura-Pabir"}, ["bws"] = {"Bomboma"}, ["bwt"] = {"Bafaw-Balong"}, ["bwu"] = {"Buli (Ghana)"}, ["bww"] = {"Bwa"}, ["bwx"] = {"Bu-Nao Bunu"}, ["bwy"] = {"Cwi Bwamu"}, ["bwz"] = {"Bwisi"}, ["bxa"] = {"Tairaha"}, ["bxb"] = {"Belanda Bor"}, ["bxc"] = {"Molengue"}, ["bxd"] = {"Pela"}, ["bxe"] = {"Birale"}, ["bxf"] = {"Bilur", "Minigir"}, ["bxg"] = {"Bangala"}, ["bxh"] = {"Buhutu"}, ["bxi"] = {"Pirlatapa"}, ["bxj"] = {"Bayungu"}, ["bxk"] = {"Bukusu", "Lubukusu"}, ["bxl"] = {"Jalkunan"}, ["bxm"] = {"Mongolia Buriat"}, ["bxn"] = {"Burduna"}, ["bxo"] = {"Barikanchi"}, ["bxp"] = {"Bebil"}, ["bxq"] = {"Beele"}, ["bxr"] = {"Russia Buriat"}, ["bxs"] = {"Busam"}, ["bxu"] = {"China Buriat"}, ["bxv"] = {"Berakou"}, ["bxw"] = {"Bankagooma"}, ["bxz"] = {"Binahari"}, ["bya"] = {"Batak"}, ["byb"] = {"Bikya"}, ["byc"] = {"Ubaghara"}, ["byd"] = {"Benyadu'"}, ["bye"] = {"Pouye"}, ["byf"] = {"Bete"}, ["byg"] = {"Baygo"}, ["byh"] = {"Bhujel"}, ["byi"] = {"Buyu"}, ["byj"] = {"Bina (Nigeria)"}, ["byk"] = {"Biao"}, ["byl"] = {"Bayono"}, ["bym"] = {"Bidjara"}, ["byn"] = {"Bilin", "Blin"}, ["byo"] = {"Biyo"}, ["byp"] = {"Bumaji"}, ["byq"] = {"Basay"}, ["byr"] = {"Baruya", "Yipma"}, ["bys"] = {"Burak"}, ["byt"] = {"Berti"}, ["byv"] = {"Medumba"}, ["byw"] = {"Belhariya"}, ["byx"] = {"Qaqet"}, ["byz"] = {"Banaro"}, ["bza"] = {"Bandi"}, ["bzb"] = {"Andio"}, ["bzc"] = {"Southern Betsimisaraka Malagasy"}, ["bzd"] = {"Bribri"}, ["bze"] = {"Jenaama Bozo"}, ["bzf"] = {"Boikin"}, ["bzg"] = {"Babuza"}, ["bzh"] = {"Mapos Buang"}, ["bzi"] = {"Bisu"}, ["bzj"] = {"Belize Kriol English"}, ["bzk"] = {"Nicaragua Creole English"}, ["bzl"] = {"Boano (Sulawesi)"}, ["bzm"] = {"Bolondo"}, ["bzn"] = {"Boano (Maluku)"}, ["bzo"] = {"Bozaba"}, ["bzp"] = {"Kemberano"}, ["bzq"] = {"Buli (Indonesia)"}, ["bzr"] = {"Biri"}, ["bzs"] = {"Brazilian Sign Language"}, ["bzt"] = {"Brithenig"}, ["bzu"] = {"Burmeso"}, ["bzv"] = {"Naami"}, ["bzw"] = {"Basa (Nigeria)"}, ["bzx"] = {"Kɛlɛngaxo Bozo"}, ["bzy"] = {"Obanliku"}, ["bzz"] = {"Evant"}, ["caa"] = {"Chortí"}, ["cab"] = {"Garifuna"}, ["cac"] = {"Chuj"}, ["cad"] = {"Caddo"}, ["cae"] = {"Lehar", "Laalaa"}, ["caf"] = {"Southern Carrier"}, ["cag"] = {"Nivaclé"}, ["cah"] = {"Cahuarano"}, ["cai"] = {"Central American Indian languages"}, ["caj"] = {"Chané"}, ["cak"] = {"Kaqchikel", "Cakchiquel"}, ["cal"] = {"Carolinian"}, ["cam"] = {"Cemuhî"}, ["can"] = {"Chambri"}, ["cao"] = {"Chácobo"}, ["cap"] = {"Chipaya"}, ["caq"] = {"Car Nicobarese"}, ["car"] = {"Galibi Carib"}, ["cas"] = {"Tsimané"}, ["cau"] = {"Caucasian languages"}, ["cav"] = {"Cavineña"}, ["caw"] = {"Callawalla"}, ["cax"] = {"Chiquitano"}, ["cay"] = {"Cayuga"}, ["caz"] = {"Canichana"}, ["cba"] = {"Chibchan languages"}, ["cbb"] = {"Cabiyarí"}, ["cbc"] = {"Carapana"}, ["cbd"] = {"Carijona"}, ["cbg"] = {"Chimila"}, ["cbi"] = {"Chachi"}, ["cbj"] = {"Ede Cabe"}, ["cbk"] = {"Chavacano"}, ["cbl"] = {"Bualkhaw Chin"}, ["cbn"] = {"Nyahkur"}, ["cbo"] = {"Izora"}, ["cbq"] = {"Tsucuba", "Cuba"}, ["cbr"] = {"Cashibo-Cacataibo"}, ["cbs"] = {"Cashinahua"}, ["cbt"] = {"Chayahuita"}, ["cbu"] = {"Candoshi-Shapra"}, ["cbv"] = {"Cacua"}, ["cbw"] = {"Kinabalian"}, ["cby"] = {"Carabayo"}, ["ccc"] = {"Chamicuro"}, ["ccd"] = {"Cafundo Creole"}, ["cce"] = {"Chopi"}, ["ccg"] = {"Samba Daka"}, ["cch"] = {"Atsam"}, ["ccj"] = {"Kasanga"}, ["ccl"] = {"Cutchi-Swahili"}, ["ccm"] = {"Malaccan Creole Malay"}, ["ccn"] = {"North Caucasian languages"}, ["cco"] = {"Comaltepec Chinantec"}, ["ccp"] = {"Chakma"}, ["ccr"] = {"Cacaopera"}, ["ccs"] = {"South Caucasian languages"}, ["cda"] = {"Choni"}, ["cdc"] = {"Chadic languages"}, ["cdd"] = {"Caddoan languages"}, ["cde"] = {"Chenchu"}, ["cdf"] = {"Chiru"}, ["cdh"] = {"Chambeali"}, ["cdi"] = {"Chodri"}, ["cdj"] = {"Churahi"}, ["cdm"] = {"Chepang"}, ["cdn"] = {"Chaudangsi"}, ["cdo"] = {"Min Dong Chinese"}, ["cdr"] = {"Cinda-Regi-Tiyal"}, ["cds"] = {"Chadian Sign Language"}, ["cdy"] = {"Chadong"}, ["cdz"] = {"Koda"}, ["cea"] = {"Lower Chehalis"}, ["ceb"] = {"Cebuano"}, ["ceg"] = {"Chamacoco"}, ["cek"] = {"Eastern Khumi Chin"}, ["cel"] = {"Celtic languages"}, ["cen"] = {"Cen"}, ["cet"] = {"Centúúm"}, ["cey"] = {"Ekai Chin"}, ["cfa"] = {"Dijim-Bwilim"}, ["cfd"] = {"Cara"}, ["cfg"] = {"Como Karim"}, ["cfm"] = {"Falam Chin"}, ["cga"] = {"Changriwa"}, ["cgc"] = {"Kagayanen"}, ["cgg"] = {"Chiga"}, ["cgk"] = {"Chocangacakha"}, ["chb"] = {"Chibcha"}, ["chc"] = {"Catawba"}, ["chd"] = {"Highland Oaxaca Chontal"}, ["chf"] = {"Tabasco Chontal"}, ["chg"] = {"Chagatai"}, ["chh"] = {"Chinook"}, ["chj"] = {"Ojitlán Chinantec"}, ["chk"] = {"Chuukese"}, ["chl"] = {"Cahuilla"}, ["chm"] = {"Mari (Russia)"}, ["chn"] = {"Chinook jargon"}, ["cho"] = {"Choctaw"}, ["chp"] = {"Chipewyan", "Dene Suline"}, ["chq"] = {"Quiotepec Chinantec"}, ["chr"] = {"Cherokee"}, ["cht"] = {"Cholón"}, ["chw"] = {"Chuwabu"}, ["chx"] = {"Chantyal"}, ["chy"] = {"Cheyenne"}, ["chz"] = {"Ozumacín Chinantec"}, ["cia"] = {"Cia-Cia"}, ["cib"] = {"Ci Gbe"}, ["cic"] = {"Chickasaw"}, ["cid"] = {"Chimariko"}, ["cie"] = {"Cineni"}, ["cih"] = {"Chinali"}, ["cik"] = {"Chitkuli Kinnauri"}, ["cim"] = {"Cimbrian"}, ["cin"] = {"Cinta Larga"}, ["cip"] = {"Chiapanec"}, ["cir"] = {"Tiri", "Haméa", "Méa"}, ["ciw"] = {"Chippewa"}, ["ciy"] = {"Chaima"}, ["cja"] = {"Western Cham"}, ["cje"] = {"Chru"}, ["cjh"] = {"Upper Chehalis"}, ["cji"] = {"Chamalal"}, ["cjk"] = {"Chokwe"}, ["cjm"] = {"Eastern Cham"}, ["cjn"] = {"Chenapian"}, ["cjo"] = {"Ashéninka Pajonal"}, ["cjp"] = {"Cabécar"}, ["cjs"] = {"Shor"}, ["cjv"] = {"Chuave"}, ["cjy"] = {"Jinyu Chinese"}, ["ckb"] = {"Central Kurdish"}, ["ckh"] = {"Chak"}, ["ckl"] = {"Cibak"}, ["ckm"] = {"Chakavian"}, ["ckn"] = {"Kaang Chin"}, ["cko"] = {"Anufo"}, ["ckq"] = {"Kajakse"}, ["ckr"] = {"Kairak"}, ["cks"] = {"Tayo"}, ["ckt"] = {"Chukot"}, ["cku"] = {"Koasati"}, ["ckv"] = {"Kavalan"}, ["ckx"] = {"Caka"}, ["cky"] = {"Cakfem-Mushere"}, ["ckz"] = {"Cakchiquel-Quiché Mixed Language"}, ["cla"] = {"Ron"}, ["clc"] = {"Chilcotin"}, ["cld"] = {"Chaldean Neo-Aramaic"}, ["cle"] = {"Lealao Chinantec"}, ["clh"] = {"Chilisso"}, ["cli"] = {"Chakali"}, ["clj"] = {"Laitu Chin"}, ["clk"] = {"Idu-Mishmi"}, ["cll"] = {"Chala"}, ["clm"] = {"Clallam"}, ["clo"] = {"Lowland Oaxaca Chontal"}, ["clt"] = {"Lautu Chin"}, ["clu"] = {"Caluyanun"}, ["clw"] = {"Chulym"}, ["cly"] = {"Eastern Highland Chatino"}, ["cma"] = {"Maa"}, ["cmc"] = {"Chamic languages"}, ["cme"] = {"Cerma"}, ["cmg"] = {"Classical Mongolian"}, ["cmi"] = {"Emberá-Chamí"}, ["cml"] = {"Campalagian"}, ["cmm"] = {"Michigamea"}, ["cmn"] = {"Mandarin Chinese"}, ["cmo"] = {"Central Mnong"}, ["cmr"] = {"Mro-Khimi Chin"}, ["cms"] = {"Messapic"}, ["cmt"] = {"Camtho"}, ["cna"] = {"Changthang"}, ["cnb"] = {"Chinbon Chin"}, ["cnc"] = {"Côông"}, ["cng"] = {"Northern Qiang"}, ["cnh"] = {"Hakha Chin", "Haka Chin"}, ["cni"] = {"Asháninka"}, ["cnk"] = {"Khumi Chin"}, ["cnl"] = {"Lalana Chinantec"}, ["cno"] = {"Con"}, ["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"}, ["cnq"] = {"Chung"}, ["cnr"] = {"Montenegrin"}, ["cns"] = {"Central Asmat"}, ["cnt"] = {"Tepetotutla Chinantec"}, ["cnu"] = {"Chenoua"}, ["cnw"] = {"Ngawn Chin"}, ["cnx"] = {"Middle Cornish"}, ["coa"] = {"Cocos Islands Malay"}, ["cob"] = {"Chicomuceltec"}, ["coc"] = {"Cocopa"}, ["cod"] = {"Cocama-Cocamilla"}, ["coe"] = {"Koreguaje"}, ["cof"] = {"Colorado"}, ["cog"] = {"Chong"}, ["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"}, ["coj"] = {"Cochimi"}, ["cok"] = {"Santa Teresa Cora"}, ["col"] = {"Columbia-Wenatchi"}, ["com"] = {"Comanche"}, ["con"] = {"Cofán"}, ["coo"] = {"Comox"}, ["cop"] = {"Coptic"}, ["coq"] = {"Coquille"}, ["cot"] = {"Caquinte"}, ["cou"] = {"Wamey"}, ["cov"] = {"Cao Miao"}, ["cow"] = {"Cowlitz"}, ["cox"] = {"Nanti"}, ["coz"] = {"Chochotec"}, ["cpa"] = {"Palantla Chinantec"}, ["cpb"] = {"Ucayali-Yurúa Ashéninka"}, ["cpc"] = {"Ajyíninka Apurucayali"}, ["cpe"] = {"English-based creoles and pidgins"}, ["cpf"] = {"French-based creoles and pidgins"}, ["cpg"] = {"Cappadocian Greek"}, ["cpi"] = {"Chinese Pidgin English"}, ["cpn"] = {"Cherepon"}, ["cpo"] = {"Kpeego"}, ["cpp"] = {"Portuguese-based creoles and pidgins"}, ["cps"] = {"Capiznon"}, ["cpu"] = {"Pichis Ashéninka"}, ["cpx"] = {"Pu-Xian Chinese"}, ["cpy"] = {"South Ucayali Ashéninka"}, ["cqd"] = {"Chuanqiandian Cluster Miao"}, ["cra"] = {"Chara"}, ["crb"] = {"Island Carib"}, ["crc"] = {"Lonwolwol"}, ["crd"] = {"Coeur d'Alene"}, ["crf"] = {"Caramanta"}, ["crg"] = {"Michif"}, ["crh"] = {"Crimean Tatar", "Crimean Turkish"}, ["cri"] = {"Sãotomense"}, ["crj"] = {"Southern East Cree"}, ["crk"] = {"Plains Cree"}, ["crl"] = {"Northern East Cree"}, ["crm"] = {"Moose Cree"}, ["crn"] = {"El Nayar Cora"}, ["cro"] = {"Crow"}, ["crp"] = {"Creoles and pidgins"}, ["crq"] = {"Iyo'wujwa Chorote"}, ["crr"] = {"Carolina Algonquian"}, ["crs"] = {"Seselwa Creole French"}, ["crt"] = {"Iyojwa'ja Chorote"}, ["crv"] = {"Chaura"}, ["crw"] = {"Chrau"}, ["crx"] = {"Carrier"}, ["cry"] = {"Cori"}, ["crz"] = {"Cruzeño"}, ["csa"] = {"Chiltepec Chinantec"}, ["csb"] = {"Kashubian"}, ["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"}, ["csd"] = {"Chiangmai Sign Language"}, ["cse"] = {"Czech Sign Language"}, ["csf"] = {"Cuba Sign Language"}, ["csg"] = {"Chilean Sign Language"}, ["csh"] = {"Asho Chin"}, ["csi"] = {"Coast Miwok"}, ["csj"] = {"Songlai Chin"}, ["csk"] = {"Jola-Kasa"}, ["csl"] = {"Chinese Sign Language"}, ["csm"] = {"Central Sierra Miwok"}, ["csn"] = {"Colombian Sign Language"}, ["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"}, ["csp"] = {"Southern Ping Chinese", "Southern Pinghua"}, ["csq"] = {"Croatia Sign Language"}, ["csr"] = {"Costa Rican Sign Language"}, ["css"] = {"Southern Ohlone"}, ["cst"] = {"Northern Ohlone"}, ["csu"] = {"Central Sudanic languages"}, ["csv"] = {"Sumtu Chin"}, ["csw"] = {"Swampy Cree"}, ["csx"] = {"Cambodian Sign Language"}, ["csy"] = {"Siyin Chin"}, ["csz"] = {"Coos"}, ["cta"] = {"Tataltepec Chatino"}, ["ctc"] = {"Chetco"}, ["ctd"] = {"Tedim Chin"}, ["cte"] = {"Tepinapa Chinantec"}, ["ctg"] = {"Chittagonian"}, ["cth"] = {"Thaiphum Chin"}, ["ctl"] = {"Tlacoatzintepec Chinantec"}, ["ctm"] = {"Chitimacha"}, ["ctn"] = {"Chhintange"}, ["cto"] = {"Emberá-Catío"}, ["ctp"] = {"Western Highland Chatino"}, ["cts"] = {"Northern Catanduanes Bikol"}, ["ctt"] = {"Wayanad Chetti"}, ["ctu"] = {"Chol"}, ["cty"] = {"Moundadan Chetty"}, ["ctz"] = {"Zacatepec Chatino"}, ["cua"] = {"Cua"}, ["cub"] = {"Cubeo"}, ["cuc"] = {"Usila Chinantec"}, ["cuh"] = {"Chuka", "Gichuka"}, ["cui"] = {"Cuiba"}, ["cuj"] = {"Mashco Piro"}, ["cuk"] = {"San Blas Kuna"}, ["cul"] = {"Culina", "Kulina"}, ["cuo"] = {"Cumanagoto"}, ["cup"] = {"Cupeño"}, ["cuq"] = {"Cun"}, ["cur"] = {"Chhulung"}, ["cus"] = {"Cushitic languages"}, ["cut"] = {"Teutila Cuicatec"}, ["cuu"] = {"Tai Ya"}, ["cuv"] = {"Cuvok"}, ["cuw"] = {"Chukwa"}, ["cux"] = {"Tepeuxila Cuicatec"}, ["cuy"] = {"Cuitlatec"}, ["cvg"] = {"Chug"}, ["cvn"] = {"Valle Nacional Chinantec"}, ["cwa"] = {"Kabwa"}, ["cwb"] = {"Maindo"}, ["cwd"] = {"Woods Cree"}, ["cwe"] = {"Kwere"}, ["cwg"] = {"Chewong", "Cheq Wong"}, ["cwt"] = {"Kuwaataay"}, ["cxh"] = {"Cha'ari"}, ["cya"] = {"Nopala Chatino"}, ["cyb"] = {"Cayubaba"}, ["cyo"] = {"Cuyonon"}, ["czh"] = {"Huizhou Chinese"}, ["czk"] = {"Knaanic"}, ["czn"] = {"Zenzontepec Chatino"}, ["czo"] = {"Min Zhong Chinese"}, ["czt"] = {"Zotung Chin"}, ["daa"] = {"Dangaléat"}, ["dac"] = {"Dambi"}, ["dad"] = {"Marik"}, ["dae"] = {"Duupa"}, ["dag"] = {"Dagbani"}, ["dah"] = {"Gwahatike"}, ["dai"] = {"Day"}, ["daj"] = {"Dar Fur Daju"}, ["dak"] = {"Dakota"}, ["dal"] = {"Dahalo"}, ["dam"] = {"Damakawa"}, ["dao"] = {"Daai Chin"}, ["daq"] = {"Dandami Maria"}, ["dar"] = {"Dargwa"}, ["das"] = {"Daho-Doo"}, ["dau"] = {"Dar Sila Daju"}, ["dav"] = {"Taita", "Dawida"}, ["daw"] = {"Davawenyo"}, ["dax"] = {"Dayi"}, ["day"] = {"Land Dayak languages"}, ["daz"] = {"Dao"}, ["dba"] = {"Bangime"}, ["dbb"] = {"Deno"}, ["dbd"] = {"Dadiya"}, ["dbe"] = {"Dabe"}, ["dbf"] = {"Edopi"}, ["dbg"] = {"Dogul Dom Dogon"}, ["dbi"] = {"Doka"}, ["dbj"] = {"Ida'an"}, ["dbl"] = {"Dyirbal"}, ["dbm"] = {"Duguri"}, ["dbn"] = {"Duriankere"}, ["dbo"] = {"Dulbu"}, ["dbp"] = {"Duwai"}, ["dbq"] = {"Daba"}, ["dbr"] = {"Dabarre"}, ["dbt"] = {"Ben Tey Dogon"}, ["dbu"] = {"Bondum Dom Dogon"}, ["dbv"] = {"Dungu"}, ["dbw"] = {"Bankan Tey Dogon"}, ["dby"] = {"Dibiyaso"}, ["dcc"] = {"Deccan"}, ["dcr"] = {"Negerhollands"}, ["dda"] = {"Dadi Dadi"}, ["ddd"] = {"Dongotono"}, ["dde"] = {"Doondo"}, ["ddg"] = {"Fataluku"}, ["ddi"] = {"West Goodenough"}, ["ddj"] = {"Jaru"}, ["ddn"] = {"Dendi (Benin)"}, ["ddo"] = {"Dido"}, ["ddr"] = {"Dhudhuroa"}, ["dds"] = {"Donno So Dogon"}, ["ddw"] = {"Dawera-Daweloor"}, ["dec"] = {"Dagik"}, ["ded"] = {"Dedua"}, ["dee"] = {"Dewoin"}, ["def"] = {"Dezfuli"}, ["deg"] = {"Degema"}, ["deh"] = {"Dehwari"}, ["dei"] = {"Demisa"}, ["dek"] = {"Dek"}, ["del"] = {"Delaware"}, ["dem"] = {"Dem"}, ["den"] = {"Slave (Athapascan)"}, ["dep"] = {"Pidgin Delaware"}, ["deq"] = {"Dendi (Central African Republic)"}, ["der"] = {"Deori"}, ["des"] = {"Desano"}, ["dev"] = {"Domung"}, ["dez"] = {"Dengese"}, ["dga"] = {"Southern Dagaare"}, ["dgb"] = {"Bunoge Dogon"}, ["dgc"] = {"Casiguran Dumagat Agta"}, ["dgd"] = {"Dagaari Dioula"}, ["dge"] = {"Degenan"}, ["dgg"] = {"Doga"}, ["dgh"] = {"Dghwede"}, ["dgi"] = {"Northern Dagara"}, ["dgk"] = {"Dagba"}, ["dgl"] = {"Andaandi", "Dongolawi"}, ["dgn"] = {"Dagoman"}, ["dgo"] = {"Dogri (individual language)"}, ["dgr"] = {"Dogrib", "Tłı̨chǫ"}, ["dgs"] = {"Dogoso"}, ["dgt"] = {"Ndra'ngith"}, ["dgw"] = {"Daungwurrung"}, ["dgx"] = {"Doghoro"}, ["dgz"] = {"Daga"}, ["dhd"] = {"Dhundari"}, ["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"}, ["dhi"] = {"Dhimal"}, ["dhl"] = {"Dhalandji"}, ["dhm"] = {"Zemba"}, ["dhn"] = {"Dhanki"}, ["dho"] = {"Dhodia"}, ["dhr"] = {"Dhargari"}, ["dhs"] = {"Dhaiso"}, ["dhu"] = {"Dhurga"}, ["dhv"] = {"Dehu", "Drehu"}, ["dhw"] = {"Dhanwar (Nepal)"}, ["dhx"] = {"Dhungaloo"}, ["dia"] = {"Dia"}, ["dib"] = {"South Central Dinka"}, ["dic"] = {"Lakota Dida"}, ["did"] = {"Didinga"}, ["dif"] = {"Dieri", "Diyari"}, ["dig"] = {"Digo", "Chidigo"}, ["dih"] = {"Kumiai"}, ["dii"] = {"Dimbong"}, ["dij"] = {"Dai"}, ["dik"] = {"Southwestern Dinka"}, ["dil"] = {"Dilling"}, ["dim"] = {"Dime"}, ["din"] = {"Dinka"}, ["dio"] = {"Dibo"}, ["dip"] = {"Northeastern Dinka"}, ["diq"] = {"Dimli (individual language)"}, ["dir"] = {"Dirim"}, ["dis"] = {"Dimasa"}, ["diu"] = {"Diriku"}, ["diw"] = {"Northwestern Dinka"}, ["dix"] = {"Dixon Reef"}, ["diy"] = {"Diuwe"}, ["diz"] = {"Ding"}, ["dja"] = {"Djadjawurrung"}, ["djb"] = {"Djinba"}, ["djc"] = {"Dar Daju Daju"}, ["djd"] = {"Djamindjung", "Ngaliwurru"}, ["dje"] = {"Zarma"}, ["djf"] = {"Djangun"}, ["dji"] = {"Djinang"}, ["djj"] = {"Djeebbana"}, ["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"}, ["djm"] = {"Jamsay Dogon"}, ["djn"] = {"Jawoyn", "Djauan"}, ["djo"] = {"Jangkang"}, ["djr"] = {"Djambarrpuyngu"}, ["dju"] = {"Kapriman"}, ["djw"] = {"Djawi"}, ["dka"] = {"Dakpakha"}, ["dkg"] = {"Kadung"}, ["dkk"] = {"Dakka"}, ["dkr"] = {"Kuijau"}, ["dks"] = {"Southeastern Dinka"}, ["dkx"] = {"Mazagway"}, ["dlg"] = {"Dolgan"}, ["dlk"] = {"Dahalik"}, ["dlm"] = {"Dalmatian"}, ["dln"] = {"Darlong"}, ["dma"] = {"Duma"}, ["dmb"] = {"Mombo Dogon"}, ["dmc"] = {"Gavak"}, ["dmd"] = {"Madhi Madhi"}, ["dme"] = {"Dugwor"}, ["dmf"] = {"Medefaidrin"}, ["dmg"] = {"Upper Kinabatangan"}, ["dmk"] = {"Domaaki"}, ["dml"] = {"Dameli"}, ["dmm"] = {"Dama"}, ["dmn"] = {"Mande languages"}, ["dmo"] = {"Kemedzung"}, ["dmr"] = {"East Damar"}, ["dms"] = {"Dampelas"}, ["dmu"] = {"Dubu", "Tebi"}, ["dmv"] = {"Dumpas"}, ["dmw"] = {"Mudburra"}, ["dmx"] = {"Dema"}, ["dmy"] = {"Demta", "Sowari"}, ["dna"] = {"Upper Grand Valley Dani"}, ["dnd"] = {"Daonda"}, ["dne"] = {"Ndendeule"}, ["dng"] = {"Dungan"}, ["dni"] = {"Lower Grand Valley Dani"}, ["dnj"] = {"Dan"}, ["dnk"] = {"Dengka"}, ["dnn"] = {"Dzùùngoo"}, ["dno"] = {"Ndrulo", "Northern Lendu"}, ["dnr"] = {"Danaru"}, ["dnt"] = {"Mid Grand Valley Dani"}, ["dnu"] = {"Danau"}, ["dnv"] = {"Danu"}, ["dnw"] = {"Western Dani"}, ["dny"] = {"Dení"}, ["doa"] = {"Dom"}, ["dob"] = {"Dobu"}, ["doc"] = {"Northern Dong"}, ["doe"] = {"Doe"}, ["dof"] = {"Domu"}, ["doh"] = {"Dong"}, ["doi"] = {"Dogri (macrolanguage)"}, ["dok"] = {"Dondo"}, ["dol"] = {"Doso"}, ["don"] = {"Toura (Papua New Guinea)"}, ["doo"] = {"Dongo"}, ["dop"] = {"Lukpa"}, ["doq"] = {"Dominican Sign Language"}, ["dor"] = {"Dori'o"}, ["dos"] = {"Dogosé"}, ["dot"] = {"Dass"}, ["dov"] = {"Dombe"}, ["dow"] = {"Doyayo"}, ["dox"] = {"Bussa"}, ["doy"] = {"Dompo"}, ["doz"] = {"Dorze"}, ["dpp"] = {"Papar"}, ["dra"] = {"Dravidian languages"}, ["drb"] = {"Dair"}, ["drc"] = {"Minderico"}, ["drd"] = {"Darmiya"}, ["dre"] = {"Dolpo"}, ["drg"] = {"Rungus"}, ["dri"] = {"C'Lela"}, ["drl"] = {"Paakantyi"}, ["drn"] = {"West Damar"}, ["dro"] = {"Daro-Matu Melanau"}, ["drq"] = {"Dura"}, ["drs"] = {"Gedeo"}, ["drt"] = {"Drents"}, ["dru"] = {"Rukai"}, ["dry"] = {"Darai"}, ["dsb"] = {"Lower Sorbian"}, ["dse"] = {"Dutch Sign Language"}, ["dsh"] = {"Daasanach"}, ["dsi"] = {"Disa"}, ["dsk"] = {"Dokshi"}, ["dsl"] = {"Danish Sign Language"}, ["dsn"] = {"Dusner"}, ["dso"] = {"Desiya"}, ["dsq"] = {"Tadaksahak"}, ["dsz"] = {"Mardin Sign Language"}, ["dta"] = {"Daur"}, ["dtb"] = {"Labuk-Kinabatangan Kadazan"}, ["dtd"] = {"Ditidaht"}, ["dth"] = {"Adithinngithigh"}, ["dti"] = {"Ana Tinga Dogon"}, ["dtk"] = {"Tene Kan Dogon"}, ["dtm"] = {"Tomo Kan Dogon"}, ["dtn"] = {"Daatsʼíin"}, ["dto"] = {"Tommo So Dogon"}, ["dtp"] = {"Kadazan Dusun", "Central Dusun"}, ["dtr"] = {"Lotud"}, ["dts"] = {"Toro So Dogon"}, ["dtt"] = {"Toro Tegu Dogon"}, ["dtu"] = {"Tebul Ure Dogon"}, ["dty"] = {"Dotyali"}, ["dua"] = {"Duala"}, ["dub"] = {"Dubli"}, ["duc"] = {"Duna"}, ["due"] = {"Umiray Dumaget Agta"}, ["duf"] = {"Dumbea", "Drubea"}, ["dug"] = {"Duruma", "Chiduruma"}, ["duh"] = {"Dungra Bhil"}, ["dui"] = {"Dumun"}, ["duk"] = {"Uyajitaya"}, ["dul"] = {"Alabat Island Agta"}, ["dum"] = {"Middle Dutch (ca. 1050-1350)"}, ["dun"] = {"Dusun Deyah"}, ["duo"] = {"Dupaninan Agta"}, ["dup"] = {"Duano"}, ["duq"] = {"Dusun Malang"}, ["dur"] = {"Dii"}, ["dus"] = {"Dumi"}, ["duu"] = {"Drung"}, ["duv"] = {"Duvle"}, ["duw"] = {"Dusun Witu"}, ["dux"] = {"Duungooma"}, ["duy"] = {"Dicamay Agta"}, ["duz"] = {"Duli-Gey"}, ["dva"] = {"Duau"}, ["dwa"] = {"Diri"}, ["dwk"] = {"Dawik Kui"}, ["dwr"] = {"Dawro"}, ["dws"] = {"Dutton World Speedwords"}, ["dwu"] = {"Dhuwal"}, ["dww"] = {"Dawawa"}, ["dwy"] = {"Dhuwaya"}, ["dwz"] = {"Dewas Rai"}, ["dya"] = {"Dyan"}, ["dyb"] = {"Dyaberdyaber"}, ["dyd"] = {"Dyugun"}, ["dyg"] = {"Villa Viciosa Agta"}, ["dyi"] = {"Djimini Senoufo"}, ["dym"] = {"Yanda Dom Dogon"}, ["dyn"] = {"Dyangadi", "Dhanggatti"}, ["dyo"] = {"Jola-Fonyi"}, ["dyr"] = {"Dyarim"}, ["dyu"] = {"Dyula"}, ["dyy"] = {"Djabugay", "Dyaabugay"}, ["dza"] = {"Tunzu"}, ["dzd"] = {"Daza"}, ["dze"] = {"Djiwarli"}, ["dzg"] = {"Dazaga"}, ["dzl"] = {"Dzalakha"}, ["dzn"] = {"Dzando"}, ["eaa"] = {"Karenggapa"}, ["ebc"] = {"Beginci"}, ["ebg"] = {"Ebughu"}, ["ebk"] = {"Eastern Bontok"}, ["ebo"] = {"Teke-Ebo"}, ["ebr"] = {"Ebrié"}, ["ebu"] = {"Embu", "Kiembu"}, ["ecr"] = {"Eteocretan"}, ["ecs"] = {"Ecuadorian Sign Language"}, ["ecy"] = {"Eteocypriot"}, ["eee"] = {"E"}, ["efa"] = {"Efai"}, ["efe"] = {"Efe"}, ["efi"] = {"Efik"}, ["ega"] = {"Ega"}, ["egl"] = {"Emilian"}, ["egm"] = {"Benamanga"}, ["ego"] = {"Eggon"}, ["egx"] = {"Egyptian languages"}, ["egy"] = {"Egyptian (Ancient)"}, ["ehs"] = {"Miyakubo Sign Language"}, ["ehu"] = {"Ehueun"}, ["eip"] = {"Eipomek"}, ["eit"] = {"Eitiep"}, ["eiv"] = {"Askopan"}, ["eja"] = {"Ejamat"}, ["eka"] = {"Ekajuk"}, ["eke"] = {"Ekit"}, ["ekg"] = {"Ekari"}, ["eki"] = {"Eki"}, ["ekk"] = {"Standard Estonian"}, ["ekl"] = {"Kol (Bangladesh)", "Kol"}, ["ekm"] = {"Elip"}, ["eko"] = {"Koti"}, ["ekp"] = {"Ekpeye"}, ["ekr"] = {"Yace"}, ["eky"] = {"Eastern Kayah"}, ["ele"] = {"Elepi"}, ["elh"] = {"El Hugeirat"}, ["eli"] = {"Nding"}, ["elk"] = {"Elkei"}, ["elm"] = {"Eleme"}, ["elo"] = {"El Molo"}, ["elu"] = {"Elu"}, ["elx"] = {"Elamite"}, ["ema"] = {"Emai-Iuleha-Ora"}, ["emb"] = {"Embaloh"}, ["eme"] = {"Emerillon"}, ["emg"] = {"Eastern Meohang"}, ["emi"] = {"Mussau-Emira"}, ["emk"] = {"Eastern Maninkakan"}, ["emm"] = {"Mamulique"}, ["emn"] = {"Eman"}, ["emp"] = {"Northern Emberá"}, ["emq"] = {"Eastern Minyag"}, ["ems"] = {"Pacific Gulf Yupik"}, ["emu"] = {"Eastern Muria"}, ["emw"] = {"Emplawas"}, ["emx"] = {"Erromintxela"}, ["emy"] = {"Epigraphic Mayan"}, ["emz"] = {"Mbessa"}, ["ena"] = {"Apali"}, ["enb"] = {"Markweeta"}, ["enc"] = {"En"}, ["end"] = {"Ende"}, ["enf"] = {"Forest Enets"}, ["enh"] = {"Tundra Enets"}, ["enl"] = {"Enlhet"}, ["enm"] = {"Middle English (1100-1500)"}, ["enn"] = {"Engenni"}, ["eno"] = {"Enggano"}, ["enq"] = {"Enga"}, ["enr"] = {"Emumu", "Emem"}, ["enu"] = {"Enu"}, ["env"] = {"Enwan (Edo State)"}, ["enw"] = {"Enwan (Akwa Ibom State)"}, ["enx"] = {"Enxet"}, ["eot"] = {"Beti (Côte d'Ivoire)"}, ["epi"] = {"Epie"}, ["era"] = {"Eravallan"}, ["erg"] = {"Sie"}, ["erh"] = {"Eruwa"}, ["eri"] = {"Ogea"}, ["erk"] = {"South Efate"}, ["ero"] = {"Horpa"}, ["err"] = {"Erre"}, ["ers"] = {"Ersu"}, ["ert"] = {"Eritai"}, ["erw"] = {"Erokwanas"}, ["ese"] = {"Ese Ejja"}, ["esg"] = {"Aheri Gondi"}, ["esh"] = {"Eshtehardi"}, ["esi"] = {"North Alaskan Inupiatun"}, ["esk"] = {"Northwest Alaska Inupiatun"}, ["esl"] = {"Egypt Sign Language"}, ["esm"] = {"Esuma"}, ["esn"] = {"Salvadoran Sign Language"}, ["eso"] = {"Estonian Sign Language"}, ["esq"] = {"Esselen"}, ["ess"] = {"Central Siberian Yupik"}, ["esu"] = {"Central Yupik"}, ["esx"] = {"Eskimo-Aleut languages"}, ["esy"] = {"Eskayan"}, ["etb"] = {"Etebi"}, ["etc"] = {"Etchemin"}, ["eth"] = {"Ethiopian Sign Language"}, ["etn"] = {"Eton (Vanuatu)"}, ["eto"] = {"Eton (Cameroon)"}, ["etr"] = {"Edolo"}, ["ets"] = {"Yekhee"}, ["ett"] = {"Etruscan"}, ["etu"] = {"Ejagham"}, ["etx"] = {"Eten"}, ["etz"] = {"Semimi"}, ["eud"] = {"Eudeve"}, ["euq"] = {"Basque (family)"}, ["eve"] = {"Even"}, ["evh"] = {"Uvbie"}, ["evn"] = {"Evenki"}, ["ewo"] = {"Ewondo"}, ["ext"] = {"Extremaduran"}, ["eya"] = {"Eyak"}, ["eyo"] = {"Keiyo"}, ["eza"] = {"Ezaa"}, ["eze"] = {"Uzekwe"}, ["faa"] = {"Fasu"}, ["fab"] = {"Fa d'Ambu"}, ["fad"] = {"Wagi"}, ["faf"] = {"Fagani"}, ["fag"] = {"Finongan"}, ["fah"] = {"Baissa Fali"}, ["fai"] = {"Faiwol"}, ["faj"] = {"Faita"}, ["fak"] = {"Fang (Cameroon)"}, ["fal"] = {"South Fali"}, ["fam"] = {"Fam"}, ["fan"] = {"Fang (Equatorial Guinea)"}, ["fap"] = {"Paloor"}, ["far"] = {"Fataleka"}, ["fat"] = {"Fanti"}, ["fau"] = {"Fayu"}, ["fax"] = {"Fala"}, ["fay"] = {"Southwestern Fars"}, ["faz"] = {"Northwestern Fars"}, ["fbl"] = {"West Albay Bikol"}, ["fcs"] = {"Quebec Sign Language"}, ["fer"] = {"Feroge"}, ["ffi"] = {"Foia Foia"}, ["ffm"] = {"Maasina Fulfulde"}, ["fgr"] = {"Fongoro"}, ["fia"] = {"Nobiin"}, ["fie"] = {"Fyer"}, ["fif"] = {"Faifi"}, ["fil"] = {"Filipino", "Pilipino"}, ["fip"] = {"Fipa"}, ["fir"] = {"Firan"}, ["fit"] = {"Tornedalen Finnish", "Meänkieli"}, ["fiu"] = {"Finno-Ugrian languages"}, ["fiw"] = {"Fiwaga"}, ["fkk"] = {"Kirya-Konzəl"}, ["fkv"] = {"Kven Finnish"}, ["fla"] = {"Kalispel-Pend d'Oreille"}, ["flh"] = {"Foau"}, ["fli"] = {"Fali"}, ["fll"] = {"North Fali"}, ["fln"] = {"Flinders Island"}, ["flr"] = {"Fuliiru"}, ["fly"] = {"Flaaitaal", "Tsotsitaal"}, ["fmp"] = {"Fe'fe'"}, ["fmu"] = {"Far Western Muria"}, ["fnb"] = {"Fanbak"}, ["fng"] = {"Fanagalo"}, ["fni"] = {"Fania"}, ["fod"] = {"Foodo"}, ["foi"] = {"Foi"}, ["fom"] = {"Foma"}, ["fon"] = {"Fon"}, ["for"] = {"Fore"}, ["fos"] = {"Siraya"}, ["fox"] = {"Formosan languages"}, ["fpe"] = {"Fernando Po Creole English"}, ["fqs"] = {"Fas"}, ["frc"] = {"Cajun French"}, ["frd"] = {"Fordata"}, ["frk"] = {"Frankish"}, ["frm"] = {"Middle French (ca. 1400-1600)"}, ["fro"] = {"Old French (842-ca. 1400)"}, ["frp"] = {"Arpitan", "Francoprovençal"}, ["frq"] = {"Forak"}, ["frr"] = {"Northern Frisian"}, ["frs"] = {"Eastern Frisian"}, ["frt"] = {"Fortsenal"}, ["fse"] = {"Finnish Sign Language"}, ["fsl"] = {"French Sign Language"}, ["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"}, ["fub"] = {"Adamawa Fulfulde"}, ["fuc"] = {"Pulaar"}, ["fud"] = {"East Futuna"}, ["fue"] = {"Borgu Fulfulde"}, ["fuf"] = {"Pular"}, ["fuh"] = {"Western Niger Fulfulde"}, ["fui"] = {"Bagirmi Fulfulde"}, ["fuj"] = {"Ko"}, ["fum"] = {"Fum"}, ["fun"] = {"Fulniô"}, ["fuq"] = {"Central-Eastern Niger Fulfulde"}, ["fur"] = {"Friulian"}, ["fut"] = {"Futuna-Aniwa"}, ["fuu"] = {"Furu"}, ["fuv"] = {"Nigerian Fulfulde"}, ["fuy"] = {"Fuyug"}, ["fvr"] = {"Fur"}, ["fwa"] = {"Fwâi"}, ["fwe"] = {"Fwe"}, ["gaa"] = {"Ga"}, ["gab"] = {"Gabri"}, ["gac"] = {"Mixed Great Andamanese"}, ["gad"] = {"Gaddang"}, ["gae"] = {"Guarequena"}, ["gaf"] = {"Gende"}, ["gag"] = {"Gagauz"}, ["gah"] = {"Alekano"}, ["gai"] = {"Borei"}, ["gaj"] = {"Gadsup"}, ["gak"] = {"Gamkonora"}, ["gal"] = {"Galolen"}, ["gam"] = {"Kandawo"}, ["gan"] = {"Gan Chinese"}, ["gao"] = {"Gants"}, ["gap"] = {"Gal"}, ["gaq"] = {"Gata'"}, ["gar"] = {"Galeya"}, ["gas"] = {"Adiwasi Garasia"}, ["gat"] = {"Kenati"}, ["gau"] = {"Mudhili Gadaba"}, ["gaw"] = {"Nobonob"}, ["gax"] = {"Borana-Arsi-Guji Oromo"}, ["gay"] = {"Gayo"}, ["gaz"] = {"West Central Oromo"}, ["gba"] = {"Gbaya (Central African Republic)"}, ["gbb"] = {"Kaytetye"}, ["gbd"] = {"Karajarri"}, ["gbe"] = {"Niksek"}, ["gbf"] = {"Gaikundi"}, ["gbg"] = {"Gbanziri"}, ["gbh"] = {"Defi Gbe"}, ["gbi"] = {"Galela"}, ["gbj"] = {"Bodo Gadaba"}, ["gbk"] = {"Gaddi"}, ["gbl"] = {"Gamit"}, ["gbm"] = {"Garhwali"}, ["gbn"] = {"Mo'da"}, ["gbo"] = {"Northern Grebo"}, ["gbp"] = {"Gbaya-Bossangoa"}, ["gbq"] = {"Gbaya-Bozoum"}, ["gbr"] = {"Gbagyi"}, ["gbs"] = {"Gbesi Gbe"}, ["gbu"] = {"Gagadu"}, ["gbv"] = {"Gbanu"}, ["gbw"] = {"Gabi-Gabi"}, ["gbx"] = {"Eastern Xwla Gbe"}, ["gby"] = {"Gbari"}, ["gbz"] = {"Zoroastrian Dari"}, ["gcc"] = {"Mali"}, ["gcd"] = {"Ganggalida"}, ["gce"] = {"Galice"}, ["gcf"] = {"Guadeloupean Creole French"}, ["gcl"] = {"Grenadian Creole English"}, ["gcn"] = {"Gaina"}, ["gcr"] = {"Guianese Creole French"}, ["gct"] = {"Colonia Tovar German"}, ["gda"] = {"Gade Lohar"}, ["gdb"] = {"Pottangi Ollar Gadaba"}, ["gdc"] = {"Gugu Badhun"}, ["gdd"] = {"Gedaged"}, ["gde"] = {"Gude"}, ["gdf"] = {"Guduf-Gava"}, ["gdg"] = {"Ga'dang"}, ["gdh"] = {"Gadjerawang", "Gajirrabeng"}, ["gdi"] = {"Gundi"}, ["gdj"] = {"Gurdjar"}, ["gdk"] = {"Gadang"}, ["gdl"] = {"Dirasha"}, ["gdm"] = {"Laal"}, ["gdn"] = {"Umanakaina"}, ["gdo"] = {"Ghodoberi"}, ["gdq"] = {"Mehri"}, ["gdr"] = {"Wipi"}, ["gds"] = {"Ghandruk Sign Language"}, ["gdt"] = {"Kungardutyi"}, ["gdu"] = {"Gudu"}, ["gdx"] = {"Godwari"}, ["gea"] = {"Geruma"}, ["geb"] = {"Kire"}, ["gec"] = {"Gboloo Grebo"}, ["ged"] = {"Gade"}, ["gef"] = {"Gerai"}, ["geg"] = {"Gengle"}, ["geh"] = {"Hutterite German", "Hutterisch"}, ["gei"] = {"Gebe"}, ["gej"] = {"Gen"}, ["gek"] = {"Ywom"}, ["gel"] = {"ut-Ma'in"}, ["gem"] = {"Germanic languages"}, ["geq"] = {"Geme"}, ["ges"] = {"Geser-Gorom"}, ["gev"] = {"Eviya"}, ["gew"] = {"Gera"}, ["gex"] = {"Garre"}, ["gey"] = {"Enya"}, ["gez"] = {"Geez"}, ["gfk"] = {"Patpatar"}, ["gft"] = {"Gafat"}, ["gga"] = {"Gao"}, ["ggb"] = {"Gbii"}, ["ggd"] = {"Gugadj"}, ["gge"] = {"Gurr-goni"}, ["ggg"] = {"Gurgula"}, ["ggk"] = {"Kungarakany"}, ["ggl"] = {"Ganglau"}, ["ggt"] = {"Gitua"}, ["ggu"] = {"Gagu", "Gban"}, ["ggw"] = {"Gogodala"}, ["gha"] = {"Ghadamès"}, ["ghc"] = {"Hiberno-Scottish Gaelic"}, ["ghe"] = {"Southern Ghale"}, ["ghh"] = {"Northern Ghale"}, ["ghk"] = {"Geko Karen"}, ["ghl"] = {"Ghulfan"}, ["ghn"] = {"Ghanongga"}, ["gho"] = {"Ghomara"}, ["ghr"] = {"Ghera"}, ["ghs"] = {"Guhu-Samane"}, ["ght"] = {"Kuke", "Kutang Ghale"}, ["gia"] = {"Kija"}, ["gib"] = {"Gibanawa"}, ["gic"] = {"Gail"}, ["gid"] = {"Gidar"}, ["gie"] = {"Gaɓogbo", "Guébie"}, ["gig"] = {"Goaria"}, ["gih"] = {"Githabul"}, ["gii"] = {"Girirra"}, ["gil"] = {"Gilbertese"}, ["gim"] = {"Gimi (Eastern Highlands)"}, ["gin"] = {"Hinukh"}, ["gip"] = {"Gimi (West New Britain)"}, ["giq"] = {"Green Gelao"}, ["gir"] = {"Red Gelao"}, ["gis"] = {"North Giziga"}, ["git"] = {"Gitxsan"}, ["giu"] = {"Mulao"}, ["giw"] = {"White Gelao"}, ["gix"] = {"Gilima"}, ["giy"] = {"Giyug"}, ["giz"] = {"South Giziga"}, ["gjk"] = {"Kachi Koli"}, ["gjm"] = {"Gunditjmara"}, ["gjn"] = {"Gonja"}, ["gjr"] = {"Gurindji Kriol"}, ["gju"] = {"Gujari"}, ["gka"] = {"Guya"}, ["gkd"] = {"Magɨ (Madang Province)"}, ["gke"] = {"Ndai"}, ["gkn"] = {"Gokana"}, ["gko"] = {"Kok-Nar"}, ["gkp"] = {"Guinea Kpelle"}, ["gku"] = {"ǂUngkue"}, ["glb"] = {"Belning"}, ["glc"] = {"Bon Gula"}, ["gld"] = {"Nanai"}, ["glh"] = {"Northwest Pashai", "Northwest Pashayi"}, ["glj"] = {"Gula Iro"}, ["glk"] = {"Gilaki"}, ["gll"] = {"Garlali"}, ["glo"] = {"Galambu"}, ["glr"] = {"Glaro-Twabo"}, ["glu"] = {"Gula (Chad)"}, ["glw"] = {"Glavda"}, ["gly"] = {"Gule"}, ["gma"] = {"Gambera"}, ["gmb"] = {"Gula'alaa"}, ["gmd"] = {"Mághdì"}, ["gme"] = {"East Germanic languages"}, ["gmg"] = {"Magɨyi"}, ["gmh"] = {"Middle High German (ca. 1050-1500)"}, ["gml"] = {"Middle Low German"}, ["gmm"] = {"Gbaya-Mbodomo"}, ["gmn"] = {"Gimnime"}, ["gmq"] = {"North Germanic languages"}, ["gmr"] = {"Mirning", "Mirniny"}, ["gmu"] = {"Gumalu"}, ["gmv"] = {"Gamo"}, ["gmw"] = {"West Germanic languages"}, ["gmx"] = {"Magoma"}, ["gmy"] = {"Mycenaean Greek"}, ["gmz"] = {"Mgbolizhia"}, ["gna"] = {"Kaansa"}, ["gnb"] = {"Gangte"}, ["gnc"] = {"Guanche"}, ["gnd"] = {"Zulgo-Gemzek"}, ["gne"] = {"Ganang"}, ["gng"] = {"Ngangam"}, ["gnh"] = {"Lere"}, ["gni"] = {"Gooniyandi"}, ["gnj"] = {"Ngen"}, ["gnk"] = {"ǁGana"}, ["gnl"] = {"Gangulu"}, ["gnm"] = {"Ginuman"}, ["gnn"] = {"Gumatj"}, ["gno"] = {"Northern Gondi"}, ["gnq"] = {"Gana"}, ["gnr"] = {"Gureng Gureng"}, ["gnt"] = {"Guntai"}, ["gnu"] = {"Gnau"}, ["gnw"] = {"Western Bolivian Guaraní"}, ["gnz"] = {"Ganzi"}, ["goa"] = {"Guro"}, ["gob"] = {"Playero"}, ["goc"] = {"Gorakor"}, ["god"] = {"Godié"}, ["goe"] = {"Gongduk"}, ["gof"] = {"Gofa"}, ["gog"] = {"Gogo"}, ["goh"] = {"Old High German (ca. 750-1050)"}, ["goi"] = {"Gobasi"}, ["goj"] = {"Gowlan"}, ["gok"] = {"Gowli"}, ["gol"] = {"Gola"}, ["gom"] = {"Goan Konkani"}, ["gon"] = {"Gondi"}, ["goo"] = {"Gone Dau"}, ["gop"] = {"Yeretuar"}, ["goq"] = {"Gorap"}, ["gor"] = {"Gorontalo"}, ["gos"] = {"Gronings"}, ["got"] = {"Gothic"}, ["gou"] = {"Gavar"}, ["gov"] = {"Goo"}, ["gow"] = {"Gorowa"}, ["gox"] = {"Gobu"}, ["goy"] = {"Goundo"}, ["goz"] = {"Gozarkhani"}, ["gpa"] = {"Gupa-Abawa"}, ["gpe"] = {"Ghanaian Pidgin English"}, ["gpn"] = {"Taiap"}, ["gqa"] = {"Ga'anda"}, ["gqi"] = {"Guiqiong"}, ["gqn"] = {"Guana (Brazil)"}, ["gqr"] = {"Gor"}, ["gqu"] = {"Qau"}, ["gra"] = {"Rajput Garasia"}, ["grb"] = {"Grebo"}, ["grc"] = {"Ancient Greek (to 1453)"}, ["grd"] = {"Guruntum-Mbaaru"}, ["grg"] = {"Madi"}, ["grh"] = {"Gbiri-Niragu"}, ["gri"] = {"Ghari"}, ["grj"] = {"Southern Grebo"}, ["grk"] = {"Greek languages"}, ["grm"] = {"Kota Marudu Talantang"}, ["gro"] = {"Groma"}, ["grq"] = {"Gorovu"}, ["grr"] = {"Taznatit"}, ["grs"] = {"Gresi"}, ["grt"] = {"Garo"}, ["gru"] = {"Kistane"}, ["grv"] = {"Central Grebo"}, ["grw"] = {"Gweda"}, ["grx"] = {"Guriaso"}, ["gry"] = {"Barclayville Grebo"}, ["grz"] = {"Guramalum"}, ["gse"] = {"Ghanaian Sign Language"}, ["gsg"] = {"German Sign Language"}, ["gsl"] = {"Gusilay"}, ["gsm"] = {"Guatemalan Sign Language"}, ["gsn"] = {"Nema", "Gusan"}, ["gso"] = {"Southwest Gbaya"}, ["gsp"] = {"Wasembo"}, ["gss"] = {"Greek Sign Language"}, ["gsw"] = {"Swiss German", "Alemannic", "Alsatian"}, ["gta"] = {"Guató"}, ["gtu"] = {"Aghu-Tharnggala"}, ["gua"] = {"Shiki"}, ["gub"] = {"Guajajára"}, ["guc"] = {"Wayuu"}, ["gud"] = {"Yocoboué Dida"}, ["gue"] = {"Gurindji"}, ["guf"] = {"Gupapuyngu"}, ["gug"] = {"Paraguayan Guaraní"}, ["guh"] = {"Guahibo"}, ["gui"] = {"Eastern Bolivian Guaraní"}, ["guk"] = {"Gumuz"}, ["gul"] = {"Sea Island Creole English"}, ["gum"] = {"Guambiano"}, ["gun"] = {"Mbyá Guaraní"}, ["guo"] = {"Guayabero"}, ["gup"] = {"Gunwinggu"}, ["guq"] = {"Aché"}, ["gur"] = {"Farefare"}, ["gus"] = {"Guinean Sign Language"}, ["gut"] = {"Maléku Jaíka"}, ["guu"] = {"Yanomamö"}, ["guw"] = {"Gun"}, ["gux"] = {"Gourmanchéma"}, ["guz"] = {"Gusii", "Ekegusii"}, ["gva"] = {"Guana (Paraguay)"}, ["gvc"] = {"Guanano"}, ["gve"] = {"Duwet"}, ["gvf"] = {"Golin"}, ["gvj"] = {"Guajá"}, ["gvl"] = {"Gulay"}, ["gvm"] = {"Gurmana"}, ["gvn"] = {"Kuku-Yalanji"}, ["gvo"] = {"Gavião Do Jiparaná"}, ["gvp"] = {"Pará Gavião"}, ["gvr"] = {"Gurung"}, ["gvs"] = {"Gumawana"}, ["gvy"] = {"Guyani"}, ["gwa"] = {"Mbato"}, ["gwb"] = {"Gwa"}, ["gwc"] = {"Gawri", "Kalami"}, ["gwd"] = {"Gawwada"}, ["gwe"] = {"Gweno"}, ["gwf"] = {"Gowro"}, ["gwg"] = {"Moo"}, ["gwi"] = {"Gwichʼin"}, ["gwj"] = {"ǀGwi"}, ["gwm"] = {"Awngthim"}, ["gwn"] = {"Gwandara"}, ["gwr"] = {"Gwere"}, ["gwt"] = {"Gawar-Bati"}, ["gwu"] = {"Guwamu"}, ["gww"] = {"Kwini"}, ["gwx"] = {"Gua"}, ["gxx"] = {"Wè Southern"}, ["gya"] = {"Northwest Gbaya"}, ["gyb"] = {"Garus"}, ["gyd"] = {"Kayardild"}, ["gye"] = {"Gyem"}, ["gyf"] = {"Gungabula"}, ["gyg"] = {"Gbayi"}, ["gyi"] = {"Gyele"}, ["gyl"] = {"Gayil"}, ["gym"] = {"Ngäbere"}, ["gyn"] = {"Guyanese Creole English"}, ["gyo"] = {"Gyalsumdo"}, ["gyr"] = {"Guarayu"}, ["gyy"] = {"Gunya"}, ["gyz"] = {"Geji", "Gyaazi"}, ["gza"] = {"Ganza"}, ["gzi"] = {"Gazi"}, ["gzn"] = {"Gane"}, ["haa"] = {"Han"}, ["hab"] = {"Hanoi Sign Language"}, ["hac"] = {"Gurani"}, ["had"] = {"Hatam"}, ["hae"] = {"Eastern Oromo"}, ["haf"] = {"Haiphong Sign Language"}, ["hag"] = {"Hanga"}, ["hah"] = {"Hahon"}, ["hai"] = {"Haida"}, ["haj"] = {"Hajong"}, ["hak"] = {"Hakka Chinese"}, ["hal"] = {"Halang"}, ["ham"] = {"Hewa"}, ["han"] = {"Hangaza"}, ["hao"] = {"Hakö"}, ["hap"] = {"Hupla"}, ["haq"] = {"Ha"}, ["har"] = {"Harari"}, ["has"] = {"Haisla"}, ["hav"] = {"Havu"}, ["haw"] = {"Hawaiian"}, ["hax"] = {"Southern Haida"}, ["hay"] = {"Haya"}, ["haz"] = {"Hazaragi"}, ["hba"] = {"Hamba"}, ["hbb"] = {"Huba"}, ["hbn"] = {"Heiban"}, ["hbo"] = {"Ancient Hebrew"}, ["hbu"] = {"Habu"}, ["hca"] = {"Andaman Creole Hindi"}, ["hch"] = {"Huichol"}, ["hdn"] = {"Northern Haida"}, ["hds"] = {"Honduras Sign Language"}, ["hdy"] = {"Hadiyya"}, ["hea"] = {"Northern Qiandong Miao"}, ["hed"] = {"Herdé"}, ["heg"] = {"Helong"}, ["heh"] = {"Hehe"}, ["hei"] = {"Heiltsuk"}, ["hem"] = {"Hemba"}, ["hgm"] = {"Haiǁom"}, ["hgw"] = {"Haigwai"}, ["hhi"] = {"Hoia Hoia"}, ["hhr"] = {"Kerak"}, ["hhy"] = {"Hoyahoya"}, ["hia"] = {"Lamang"}, ["hib"] = {"Hibito"}, ["hid"] = {"Hidatsa"}, ["hif"] = {"Fiji Hindi"}, ["hig"] = {"Kamwe"}, ["hih"] = {"Pamosu"}, ["hii"] = {"Hinduri"}, ["hij"] = {"Hijuk"}, ["hik"] = {"Seit-Kaitetu"}, ["hil"] = {"Hiligaynon"}, ["him"] = {"Himachali languages", "Western Pahari languages"}, ["hio"] = {"Tsoa"}, ["hir"] = {"Himarimã"}, ["hit"] = {"Hittite"}, ["hiw"] = {"Hiw"}, ["hix"] = {"Hixkaryána"}, ["hji"] = {"Haji"}, ["hka"] = {"Kahe"}, ["hke"] = {"Hunde"}, ["hkh"] = {"Khah", "Poguli"}, ["hkk"] = {"Hunjara-Kaina Ke"}, ["hkn"] = {"Mel-Khaonh"}, ["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"}, ["hla"] = {"Halia"}, ["hlb"] = {"Halbi"}, ["hld"] = {"Halang Doan"}, ["hle"] = {"Hlersu"}, ["hlt"] = {"Matu Chin"}, ["hlu"] = {"Hieroglyphic Luwian"}, ["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"}, ["hmb"] = {"Humburi Senni Songhay"}, ["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"}, ["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"}, ["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"}, ["hmf"] = {"Hmong Don"}, ["hmg"] = {"Southwestern Guiyang Hmong"}, ["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"}, ["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"}, ["hmj"] = {"Ge", "Gejia"}, ["hmk"] = {"Maek"}, ["hml"] = {"Luopohe Hmong", "Luopohe Miao"}, ["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"}, ["hmn"] = {"Hmong", "Mong"}, ["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"}, ["hmq"] = {"Eastern Qiandong Miao"}, ["hmr"] = {"Hmar"}, ["hms"] = {"Southern Qiandong Miao"}, ["hmt"] = {"Hamtai"}, ["hmu"] = {"Hamap"}, ["hmv"] = {"Hmong Dô"}, ["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"}, ["hmx"] = {"Hmong-Mien languages"}, ["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"}, ["hmz"] = {"Hmong Shua", "Sinicized Miao"}, ["hna"] = {"Mina (Cameroon)"}, ["hnd"] = {"Southern Hindko"}, ["hne"] = {"Chhattisgarhi"}, ["hng"] = {"Hungu"}, ["hnh"] = {"ǁAni"}, ["hni"] = {"Hani"}, ["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"}, ["hnn"] = {"Hanunoo"}, ["hno"] = {"Northern Hindko"}, ["hns"] = {"Caribbean Hindustani"}, ["hnu"] = {"Hung"}, ["hoa"] = {"Hoava"}, ["hob"] = {"Mari (Madang Province)"}, ["hoc"] = {"Ho"}, ["hod"] = {"Holma"}, ["hoe"] = {"Horom"}, ["hoh"] = {"Hobyót"}, ["hoi"] = {"Holikachuk"}, ["hoj"] = {"Hadothi", "Haroti"}, ["hok"] = {"Hokan languages"}, ["hol"] = {"Holu"}, ["hom"] = {"Homa"}, ["hoo"] = {"Holoholo"}, ["hop"] = {"Hopi"}, ["hor"] = {"Horo"}, ["hos"] = {"Ho Chi Minh City Sign Language"}, ["hot"] = {"Hote", "Malê"}, ["hov"] = {"Hovongan"}, ["how"] = {"Honi"}, ["hoy"] = {"Holiya"}, ["hoz"] = {"Hozo"}, ["hpo"] = {"Hpon"}, ["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"}, ["hra"] = {"Hrangkhol"}, ["hrc"] = {"Niwer Mil"}, ["hre"] = {"Hre"}, ["hrk"] = {"Haruku"}, ["hrm"] = {"Horned Miao"}, ["hro"] = {"Haroi"}, ["hrp"] = {"Nhirrpi"}, ["hrt"] = {"Hértevin"}, ["hru"] = {"Hruso"}, ["hrw"] = {"Warwar Feni"}, ["hrx"] = {"Hunsrik"}, ["hrz"] = {"Harzani"}, ["hsb"] = {"Upper Sorbian"}, ["hsh"] = {"Hungarian Sign Language"}, ["hsl"] = {"Hausa Sign Language"}, ["hsn"] = {"Xiang Chinese"}, ["hss"] = {"Harsusi"}, ["hti"] = {"Hoti"}, ["hto"] = {"Minica Huitoto"}, ["hts"] = {"Hadza"}, ["htu"] = {"Hitu"}, ["htx"] = {"Middle Hittite"}, ["hub"] = {"Huambisa"}, ["huc"] = {"ǂHua", "ǂʼAmkhoe"}, ["hud"] = {"Huaulu"}, ["hue"] = {"San Francisco Del Mar Huave"}, ["huf"] = {"Humene"}, ["hug"] = {"Huachipaeri"}, ["huh"] = {"Huilliche"}, ["hui"] = {"Huli"}, ["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"}, ["huk"] = {"Hulung"}, ["hul"] = {"Hula"}, ["hum"] = {"Hungana"}, ["huo"] = {"Hu"}, ["hup"] = {"Hupa"}, ["huq"] = {"Tsat"}, ["hur"] = {"Halkomelem"}, ["hus"] = {"Huastec"}, ["hut"] = {"Humla"}, ["huu"] = {"Murui Huitoto"}, ["huv"] = {"San Mateo Del Mar Huave"}, ["huw"] = {"Hukumina"}, ["hux"] = {"Nüpode Huitoto"}, ["huy"] = {"Hulaulá"}, ["huz"] = {"Hunzib"}, ["hvc"] = {"Haitian Vodoun Culture Language"}, ["hve"] = {"San Dionisio Del Mar Huave"}, ["hvk"] = {"Haveke"}, ["hvn"] = {"Sabu"}, ["hvv"] = {"Santa María Del Mar Huave"}, ["hwa"] = {"Wané"}, ["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"}, ["hwo"] = {"Hwana"}, ["hya"] = {"Hya"}, ["hyw"] = {"Western Armenian"}, ["hyx"] = {"Armenian (family)"}, ["iai"] = {"Iaai"}, ["ian"] = {"Iatmul"}, ["iar"] = {"Purari"}, ["iba"] = {"Iban"}, ["ibb"] = {"Ibibio"}, ["ibd"] = {"Iwaidja"}, ["ibe"] = {"Akpes"}, ["ibg"] = {"Ibanag"}, ["ibh"] = {"Bih"}, ["ibl"] = {"Ibaloi"}, ["ibm"] = {"Agoi"}, ["ibn"] = {"Ibino"}, ["ibr"] = {"Ibuoro"}, ["ibu"] = {"Ibu"}, ["iby"] = {"Ibani"}, ["ica"] = {"Ede Ica"}, ["ich"] = {"Etkywan"}, ["icl"] = {"Icelandic Sign Language"}, ["icr"] = {"Islander Creole English"}, ["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"}, ["idb"] = {"Indo-Portuguese"}, ["idc"] = {"Idon", "Ajiya"}, ["idd"] = {"Ede Idaca"}, ["ide"] = {"Idere"}, ["idi"] = {"Idi"}, ["idr"] = {"Indri"}, ["ids"] = {"Idesa"}, ["idt"] = {"Idaté"}, ["idu"] = {"Idoma"}, ["ifa"] = {"Amganad Ifugao"}, ["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"}, ["ife"] = {"Ifè"}, ["iff"] = {"Ifo"}, ["ifk"] = {"Tuwali Ifugao"}, ["ifm"] = {"Teke-Fuumu"}, ["ifu"] = {"Mayoyao Ifugao"}, ["ify"] = {"Keley-I Kallahan"}, ["igb"] = {"Ebira"}, ["ige"] = {"Igede"}, ["igg"] = {"Igana"}, ["igl"] = {"Igala"}, ["igm"] = {"Kanggape"}, ["ign"] = {"Ignaciano"}, ["igo"] = {"Isebe"}, ["igs"] = {"Interglossa"}, ["igw"] = {"Igwe"}, ["ihb"] = {"Iha Based Pidgin"}, ["ihi"] = {"Ihievbe"}, ["ihp"] = {"Iha"}, ["ihw"] = {"Bidhawal"}, ["iin"] = {"Thiin"}, ["iir"] = {"Indo-Iranian languages"}, ["ijc"] = {"Izon"}, ["ije"] = {"Biseni"}, ["ijj"] = {"Ede Ije"}, ["ijn"] = {"Kalabari"}, ["ijo"] = {"Ijo languages"}, ["ijs"] = {"Southeast Ijo"}, ["ike"] = {"Eastern Canadian Inuktitut"}, ["ikh"] = {"Ikhin-Arokho"}, ["iki"] = {"Iko"}, ["ikk"] = {"Ika"}, ["ikl"] = {"Ikulu"}, ["iko"] = {"Olulumo-Ikom"}, ["ikp"] = {"Ikpeshi"}, ["ikr"] = {"Ikaranggal"}, ["iks"] = {"Inuit Sign Language"}, ["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"}, ["ikv"] = {"Iku-Gora-Ankwa"}, ["ikw"] = {"Ikwere"}, ["ikx"] = {"Ik"}, ["ikz"] = {"Ikizu"}, ["ila"] = {"Ile Ape"}, ["ilb"] = {"Ila"}, ["ilg"] = {"Garig-Ilgar"}, ["ili"] = {"Ili Turki"}, ["ilk"] = {"Ilongot"}, ["ilm"] = {"Iranun (Malaysia)"}, ["ilo"] = {"Iloko"}, ["ilp"] = {"Iranun (Philippines)"}, ["ils"] = {"International Sign"}, ["ilu"] = {"Ili'uun"}, ["ilv"] = {"Ilue"}, ["ima"] = {"Mala Malasar"}, ["imi"] = {"Anamgura"}, ["iml"] = {"Miluk"}, ["imn"] = {"Imonda"}, ["imo"] = {"Imbongu"}, ["imr"] = {"Imroing"}, ["ims"] = {"Marsian"}, ["imt"] = {"Imotong"}, ["imy"] = {"Milyan"}, ["inb"] = {"Inga"}, ["inc"] = {"Indic languages"}, ["ine"] = {"Indo-European languages"}, ["ing"] = {"Degexit'an"}, ["inh"] = {"Ingush"}, ["inj"] = {"Jungle Inga"}, ["inl"] = {"Indonesian Sign Language"}, ["inm"] = {"Minaean"}, ["inn"] = {"Isinai"}, ["ino"] = {"Inoke-Yate"}, ["inp"] = {"Iñapari"}, ["ins"] = {"Indian Sign Language"}, ["int"] = {"Intha"}, ["inz"] = {"Ineseño"}, ["ior"] = {"Inor"}, ["iou"] = {"Tuma-Irumu"}, ["iow"] = {"Iowa-Oto"}, ["ipi"] = {"Ipili"}, ["ipo"] = {"Ipiko"}, ["iqu"] = {"Iquito"}, ["iqw"] = {"Ikwo"}, ["ira"] = {"Iranian languages"}, ["ire"] = {"Iresim"}, ["irh"] = {"Irarutu"}, ["iri"] = {"Rigwe", "Irigwe"}, ["irk"] = {"Iraqw"}, ["irn"] = {"Irántxe"}, ["iro"] = {"Iroquoian languages"}, ["irr"] = {"Ir"}, ["iru"] = {"Irula"}, ["irx"] = {"Kamberau"}, ["iry"] = {"Iraya"}, ["isa"] = {"Isabi"}, ["isc"] = {"Isconahua"}, ["isd"] = {"Isnag"}, ["ise"] = {"Italian Sign Language"}, ["isg"] = {"Irish Sign Language"}, ["ish"] = {"Esan"}, ["isi"] = {"Nkem-Nkum"}, ["isk"] = {"Ishkashimi"}, ["ism"] = {"Masimasi"}, ["isn"] = {"Isanzu"}, ["iso"] = {"Isoko"}, ["isr"] = {"Israeli Sign Language"}, ["ist"] = {"Istriot"}, ["isu"] = {"Isu (Menchum Division)"}, ["itb"] = {"Binongan Itneg"}, ["itc"] = {"Italic languages"}, ["itd"] = {"Southern Tidung"}, ["ite"] = {"Itene"}, ["iti"] = {"Inlaod Itneg"}, ["itk"] = {"Judeo-Italian"}, ["itl"] = {"Itelmen"}, ["itm"] = {"Itu Mbon Uzo"}, ["ito"] = {"Itonama"}, ["itr"] = {"Iteri"}, ["its"] = {"Isekiri"}, ["itt"] = {"Maeng Itneg"}, ["itv"] = {"Itawit"}, ["itw"] = {"Ito"}, ["itx"] = {"Itik"}, ["ity"] = {"Moyadan Itneg"}, ["itz"] = {"Itzá"}, ["ium"] = {"Iu Mien"}, ["ivb"] = {"Ibatan"}, ["ivv"] = {"Ivatan"}, ["iwk"] = {"I-Wak"}, ["iwm"] = {"Iwam"}, ["iwo"] = {"Iwur"}, ["iws"] = {"Sepik Iwam"}, ["ixc"] = {"Ixcatec"}, ["ixl"] = {"Ixil"}, ["iya"] = {"Iyayu"}, ["iyo"] = {"Mesaka"}, ["iyx"] = {"Yaka (Congo)"}, ["izh"] = {"Ingrian"}, ["izm"] = {"Kizamani"}, ["izr"] = {"Izere"}, ["izz"] = {"Izii"}, ["jaa"] = {"Jamamadí"}, ["jab"] = {"Hyam"}, ["jac"] = {"Popti'", "Jakalteko"}, ["jad"] = {"Jahanka"}, ["jae"] = {"Yabem"}, ["jaf"] = {"Jara"}, ["jah"] = {"Jah Hut"}, ["jaj"] = {"Zazao"}, ["jak"] = {"Jakun"}, ["jal"] = {"Yalahatan"}, ["jam"] = {"Jamaican Creole English"}, ["jan"] = {"Jandai"}, ["jao"] = {"Yanyuwa"}, ["jaq"] = {"Yaqay"}, ["jas"] = {"New Caledonian Javanese"}, ["jat"] = {"Jakati"}, ["jau"] = {"Yaur"}, ["jax"] = {"Jambi Malay"}, ["jay"] = {"Yan-nhangu", "Nhangu"}, ["jaz"] = {"Jawe"}, ["jbe"] = {"Judeo-Berber"}, ["jbi"] = {"Badjiri"}, ["jbj"] = {"Arandai"}, ["jbk"] = {"Barikewa"}, ["jbm"] = {"Bijim"}, ["jbn"] = {"Nafusi"}, ["jbo"] = {"Lojban"}, ["jbr"] = {"Jofotek-Bromnya"}, ["jbt"] = {"Jabutí"}, ["jbu"] = {"Jukun Takum"}, ["jbw"] = {"Yawijibaya"}, ["jcs"] = {"Jamaican Country Sign Language"}, ["jct"] = {"Krymchak"}, ["jda"] = {"Jad"}, ["jdg"] = {"Jadgali"}, ["jdt"] = {"Judeo-Tat"}, ["jeb"] = {"Jebero"}, ["jee"] = {"Jerung"}, ["jeh"] = {"Jeh"}, ["jei"] = {"Yei"}, ["jek"] = {"Jeri Kuo"}, ["jel"] = {"Yelmek"}, ["jen"] = {"Dza"}, ["jer"] = {"Jere"}, ["jet"] = {"Manem"}, ["jeu"] = {"Jonkor Bourmataguil"}, ["jgb"] = {"Ngbee"}, ["jge"] = {"Judeo-Georgian"}, ["jgk"] = {"Gwak"}, ["jgo"] = {"Ngomba"}, ["jhi"] = {"Jehai"}, ["jhs"] = {"Jhankot Sign Language"}, ["jia"] = {"Jina"}, ["jib"] = {"Jibu"}, ["jic"] = {"Tol"}, ["jid"] = {"Bu (Kaduna State)"}, ["jie"] = {"Jilbe"}, ["jig"] = {"Jingulu", "Djingili"}, ["jih"] = {"sTodsde", "Shangzhai"}, ["jii"] = {"Jiiddu"}, ["jil"] = {"Jilim"}, ["jim"] = {"Jimi (Cameroon)"}, ["jio"] = {"Jiamao"}, ["jiq"] = {"Guanyinqiao", "Lavrung"}, ["jit"] = {"Jita"}, ["jiu"] = {"Youle Jinuo"}, ["jiv"] = {"Shuar"}, ["jiy"] = {"Buyuan Jinuo"}, ["jje"] = {"Jejueo"}, ["jjr"] = {"Bankal"}, ["jka"] = {"Kaera"}, ["jkm"] = {"Mobwa Karen"}, ["jko"] = {"Kubo"}, ["jkp"] = {"Paku Karen"}, ["jkr"] = {"Koro (India)"}, ["jks"] = {"Amami Koniya Sign Language"}, ["jku"] = {"Labir"}, ["jle"] = {"Ngile"}, ["jls"] = {"Jamaican Sign Language"}, ["jma"] = {"Dima"}, ["jmb"] = {"Zumbun"}, ["jmc"] = {"Machame"}, ["jmd"] = {"Yamdena"}, ["jmi"] = {"Jimi (Nigeria)"}, ["jml"] = {"Jumli"}, ["jmn"] = {"Makuri Naga"}, ["jmr"] = {"Kamara"}, ["jms"] = {"Mashi (Nigeria)"}, ["jmw"] = {"Mouwase"}, ["jmx"] = {"Western Juxtlahuaca Mixtec"}, ["jna"] = {"Jangshung"}, ["jnd"] = {"Jandavra"}, ["jng"] = {"Yangman"}, ["jni"] = {"Janji"}, ["jnj"] = {"Yemsa"}, ["jnl"] = {"Rawat"}, ["jns"] = {"Jaunsari"}, ["job"] = {"Joba"}, ["jod"] = {"Wojenaka"}, ["jog"] = {"Jogi"}, ["jor"] = {"Jorá"}, ["jos"] = {"Jordanian Sign Language"}, ["jow"] = {"Jowulu"}, ["jpa"] = {"Jewish Palestinian Aramaic"}, ["jpr"] = {"Judeo-Persian"}, ["jpx"] = {"Japanese (family)"}, ["jqr"] = {"Jaqaru"}, ["jra"] = {"Jarai"}, ["jrb"] = {"Judeo-Arabic"}, ["jrr"] = {"Jiru"}, ["jrt"] = {"Jakattoe"}, ["jru"] = {"Japrería"}, ["jsl"] = {"Japanese Sign Language"}, ["jua"] = {"Júma"}, ["jub"] = {"Wannu"}, ["juc"] = {"Jurchen"}, ["jud"] = {"Worodougou"}, ["juh"] = {"Hõne"}, ["jui"] = {"Ngadjuri"}, ["juk"] = {"Wapan"}, ["jul"] = {"Jirel"}, ["jum"] = {"Jumjum"}, ["jun"] = {"Juang"}, ["juo"] = {"Jiba"}, ["jup"] = {"Hupdë"}, ["jur"] = {"Jurúna"}, ["jus"] = {"Jumla Sign Language"}, ["jut"] = {"Jutish"}, ["juu"] = {"Ju"}, ["juw"] = {"Wãpha"}, ["juy"] = {"Juray"}, ["jvd"] = {"Javindo"}, ["jvn"] = {"Caribbean Javanese"}, ["jwi"] = {"Jwira-Pepesa"}, ["jya"] = {"Jiarong"}, ["jye"] = {"Judeo-Yemeni Arabic"}, ["jyy"] = {"Jaya"}, ["kaa"] = {"Kara-Kalpak", "Karakalpak"}, ["kab"] = {"Kabyle"}, ["kac"] = {"Kachin", "Jingpho"}, ["kad"] = {"Adara"}, ["kae"] = {"Ketangalan"}, ["kaf"] = {"Katso"}, ["kag"] = {"Kajaman"}, ["kah"] = {"Kara (Central African Republic)"}, ["kai"] = {"Karekare"}, ["kaj"] = {"Jju"}, ["kak"] = {"Kalanguya", "Kayapa Kallahan"}, ["kam"] = {"Kamba (Kenya)"}, ["kao"] = {"Xaasongaxango"}, ["kap"] = {"Bezhta"}, ["kaq"] = {"Capanahua"}, ["kar"] = {"Karen languages"}, ["kav"] = {"Katukína"}, ["kaw"] = {"Kawi"}, ["kax"] = {"Kao"}, ["kay"] = {"Kamayurá"}, ["kba"] = {"Kalarko"}, ["kbb"] = {"Kaxuiâna"}, ["kbc"] = {"Kadiwéu"}, ["kbd"] = {"Kabardian"}, ["kbe"] = {"Kanju"}, ["kbg"] = {"Khamba"}, ["kbh"] = {"Camsá"}, ["kbi"] = {"Kaptiau"}, ["kbj"] = {"Kari"}, ["kbk"] = {"Grass Koiari"}, ["kbl"] = {"Kanembu"}, ["kbm"] = {"Iwal"}, ["kbn"] = {"Kare (Central African Republic)"}, ["kbo"] = {"Keliko"}, ["kbp"] = {"Kabiyè"}, ["kbq"] = {"Kamano"}, ["kbr"] = {"Kafa"}, ["kbs"] = {"Kande"}, ["kbt"] = {"Abadi"}, ["kbu"] = {"Kabutra"}, ["kbv"] = {"Dera (Indonesia)"}, ["kbw"] = {"Kaiep"}, ["kbx"] = {"Ap Ma"}, ["kby"] = {"Manga Kanuri"}, ["kbz"] = {"Duhwa"}, ["kca"] = {"Khanty"}, ["kcb"] = {"Kawacha"}, ["kcc"] = {"Lubila"}, ["kcd"] = {"Ngkâlmpw Kanum"}, ["kce"] = {"Kaivi"}, ["kcf"] = {"Ukaan"}, ["kcg"] = {"Tyap"}, ["kch"] = {"Vono"}, ["kci"] = {"Kamantan"}, ["kcj"] = {"Kobiana"}, ["kck"] = {"Kalanga"}, ["kcl"] = {"Kela (Papua New Guinea)", "Kala"}, ["kcm"] = {"Gula (Central African Republic)"}, ["kcn"] = {"Nubi"}, ["kco"] = {"Kinalakna"}, ["kcp"] = {"Kanga"}, ["kcq"] = {"Kamo"}, ["kcr"] = {"Katla"}, ["kcs"] = {"Koenoem"}, ["kct"] = {"Kaian"}, ["kcu"] = {"Kami (Tanzania)"}, ["kcv"] = {"Kete"}, ["kcw"] = {"Kabwari"}, ["kcx"] = {"Kachama-Ganjule"}, ["kcy"] = {"Korandje"}, ["kcz"] = {"Konongo"}, ["kda"] = {"Worimi"}, ["kdc"] = {"Kutu"}, ["kdd"] = {"Yankunytjatjara"}, ["kde"] = {"Makonde"}, ["kdf"] = {"Mamusi"}, ["kdg"] = {"Seba"}, ["kdh"] = {"Tem"}, ["kdi"] = {"Kumam"}, ["kdj"] = {"Karamojong"}, ["kdk"] = {"Numèè", "Kwényi"}, ["kdl"] = {"Tsikimba"}, ["kdm"] = {"Kagoma"}, ["kdn"] = {"Kunda"}, ["kdo"] = {"Kordofanian languages"}, ["kdp"] = {"Kaningdon-Nindem"}, ["kdq"] = {"Koch"}, ["kdr"] = {"Karaim"}, ["kdt"] = {"Kuy"}, ["kdu"] = {"Kadaru"}, ["kdw"] = {"Koneraw"}, ["kdx"] = {"Kam"}, ["kdy"] = {"Keder", "Keijar"}, ["kdz"] = {"Kwaja"}, ["kea"] = {"Kabuverdianu"}, ["keb"] = {"Kélé"}, ["kec"] = {"Keiga"}, ["ked"] = {"Kerewe"}, ["kee"] = {"Eastern Keres"}, ["kef"] = {"Kpessi"}, ["keg"] = {"Tese"}, ["keh"] = {"Keak"}, ["kei"] = {"Kei"}, ["kej"] = {"Kadar"}, ["kek"] = {"Kekchí"}, ["kel"] = {"Kela (Democratic Republic of Congo)"}, ["kem"] = {"Kemak"}, ["ken"] = {"Kenyang"}, ["keo"] = {"Kakwa"}, ["kep"] = {"Kaikadi"}, ["keq"] = {"Kamar"}, ["ker"] = {"Kera"}, ["kes"] = {"Kugbo"}, ["ket"] = {"Ket"}, ["keu"] = {"Akebu"}, ["kev"] = {"Kanikkaran"}, ["kew"] = {"West Kewa"}, ["kex"] = {"Kukna"}, ["key"] = {"Kupia"}, ["kez"] = {"Kukele"}, ["kfa"] = {"Kodava"}, ["kfb"] = {"Northwestern Kolami"}, ["kfc"] = {"Konda-Dora"}, ["kfd"] = {"Korra Koraga"}, ["kfe"] = {"Kota (India)"}, ["kff"] = {"Koya"}, ["kfg"] = {"Kudiya"}, ["kfh"] = {"Kurichiya"}, ["kfi"] = {"Kannada Kurumba"}, ["kfj"] = {"Kemiehua"}, ["kfk"] = {"Kinnauri"}, ["kfl"] = {"Kung"}, ["kfm"] = {"Khunsari"}, ["kfn"] = {"Kuk"}, ["kfo"] = {"Koro (Côte d'Ivoire)"}, ["kfp"] = {"Korwa"}, ["kfq"] = {"Korku"}, ["kfr"] = {"Kachhi", "Kutchi"}, ["kfs"] = {"Bilaspuri"}, ["kft"] = {"Kanjari"}, ["kfu"] = {"Katkari"}, ["kfv"] = {"Kurmukar"}, ["kfw"] = {"Kharam Naga"}, ["kfx"] = {"Kullu Pahari"}, ["kfy"] = {"Kumaoni"}, ["kfz"] = {"Koromfé"}, ["kga"] = {"Koyaga"}, ["kgb"] = {"Kawe"}, ["kge"] = {"Komering"}, ["kgf"] = {"Kube"}, ["kgg"] = {"Kusunda"}, ["kgi"] = {"Selangor Sign Language"}, ["kgj"] = {"Gamale Kham"}, ["kgk"] = {"Kaiwá"}, ["kgl"] = {"Kunggari"}, ["kgn"] = {"Karingani"}, ["kgo"] = {"Krongo"}, ["kgp"] = {"Kaingang"}, ["kgq"] = {"Kamoro"}, ["kgr"] = {"Abun"}, ["kgs"] = {"Kumbainggar"}, ["kgt"] = {"Somyev"}, ["kgu"] = {"Kobol"}, ["kgv"] = {"Karas"}, ["kgw"] = {"Karon Dori"}, ["kgx"] = {"Kamaru"}, ["kgy"] = {"Kyerung"}, ["kha"] = {"Khasi"}, ["khb"] = {"Lü"}, ["khc"] = {"Tukang Besi North"}, ["khd"] = {"Bädi Kanum"}, ["khe"] = {"Korowai"}, ["khf"] = {"Khuen"}, ["khg"] = {"Khams Tibetan"}, ["khh"] = {"Kehu"}, ["khi"] = {"Khoisan languages"}, ["khj"] = {"Kuturmi"}, ["khk"] = {"Halh Mongolian"}, ["khl"] = {"Lusi"}, ["khn"] = {"Khandesi"}, ["kho"] = {"Khotanese", "Sakan"}, ["khp"] = {"Kapori", "Kapauri"}, ["khq"] = {"Koyra Chiini Songhay"}, ["khr"] = {"Kharia"}, ["khs"] = {"Kasua"}, ["kht"] = {"Khamti"}, ["khu"] = {"Nkhumbi"}, ["khv"] = {"Khvarshi"}, ["khw"] = {"Khowar"}, ["khx"] = {"Kanu"}, ["khy"] = {"Kele (Democratic Republic of Congo)"}, ["khz"] = {"Keapara"}, ["kia"] = {"Kim"}, ["kib"] = {"Koalib"}, ["kic"] = {"Kickapoo"}, ["kid"] = {"Koshin"}, ["kie"] = {"Kibet"}, ["kif"] = {"Eastern Parbate Kham"}, ["kig"] = {"Kimaama", "Kimaghima"}, ["kih"] = {"Kilmeri"}, ["kii"] = {"Kitsai"}, ["kij"] = {"Kilivila"}, ["kil"] = {"Kariya"}, ["kim"] = {"Karagas"}, ["kio"] = {"Kiowa"}, ["kip"] = {"Sheshi Kham"}, ["kiq"] = {"Kosadle", "Kosare"}, ["kis"] = {"Kis"}, ["kit"] = {"Agob"}, ["kiu"] = {"Kirmanjki (individual language)"}, ["kiv"] = {"Kimbu"}, ["kiw"] = {"Northeast Kiwai"}, ["kix"] = {"Khiamniungan Naga"}, ["kiy"] = {"Kirikiri"}, ["kiz"] = {"Kisi"}, ["kja"] = {"Mlap"}, ["kjb"] = {"Q'anjob'al", "Kanjobal"}, ["kjc"] = {"Coastal Konjo"}, ["kjd"] = {"Southern Kiwai"}, ["kje"] = {"Kisar"}, ["kjg"] = {"Khmu"}, ["kjh"] = {"Khakas"}, ["kji"] = {"Zabana"}, ["kjj"] = {"Khinalugh"}, ["kjk"] = {"Highland Konjo"}, ["kjl"] = {"Western Parbate Kham"}, ["kjm"] = {"Kháng"}, ["kjn"] = {"Kunjen"}, ["kjo"] = {"Harijan Kinnauri"}, ["kjp"] = {"Pwo Eastern Karen"}, ["kjq"] = {"Western Keres"}, ["kjr"] = {"Kurudu"}, ["kjs"] = {"East Kewa"}, ["kjt"] = {"Phrae Pwo Karen"}, ["kju"] = {"Kashaya"}, ["kjv"] = {"Kaikavian Literary Language"}, ["kjx"] = {"Ramopa"}, ["kjy"] = {"Erave"}, ["kjz"] = {"Bumthangkha"}, ["kka"] = {"Kakanda"}, ["kkb"] = {"Kwerisa"}, ["kkc"] = {"Odoodee"}, ["kkd"] = {"Kinuku"}, ["kke"] = {"Kakabe"}, ["kkf"] = {"Kalaktang Monpa"}, ["kkg"] = {"Mabaka Valley Kalinga"}, ["kkh"] = {"Khün"}, ["kki"] = {"Kagulu"}, ["kkj"] = {"Kako"}, ["kkk"] = {"Kokota"}, ["kkl"] = {"Kosarek Yale"}, ["kkm"] = {"Kiong"}, ["kkn"] = {"Kon Keu"}, ["kko"] = {"Karko"}, ["kkp"] = {"Gugubera", "Koko-Bera"}, ["kkq"] = {"Kaeku"}, ["kkr"] = {"Kir-Balar"}, ["kks"] = {"Giiwo"}, ["kkt"] = {"Koi"}, ["kku"] = {"Tumi"}, ["kkv"] = {"Kangean"}, ["kkw"] = {"Teke-Kukuya"}, ["kkx"] = {"Kohin"}, ["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"}, ["kkz"] = {"Kaska"}, ["kla"] = {"Klamath-Modoc"}, ["klb"] = {"Kiliwa"}, ["klc"] = {"Kolbila"}, ["kld"] = {"Gamilaraay"}, ["kle"] = {"Kulung (Nepal)"}, ["klf"] = {"Kendeje"}, ["klg"] = {"Tagakaulo"}, ["klh"] = {"Weliki"}, ["kli"] = {"Kalumpang"}, ["klj"] = {"Khalaj"}, ["klk"] = {"Kono (Nigeria)"}, ["kll"] = {"Kagan Kalagan"}, ["klm"] = {"Migum"}, ["kln"] = {"Kalenjin"}, ["klo"] = {"Kapya"}, ["klp"] = {"Kamasa"}, ["klq"] = {"Rumu"}, ["klr"] = {"Khaling"}, ["kls"] = {"Kalasha"}, ["klt"] = {"Nukna"}, ["klu"] = {"Klao"}, ["klv"] = {"Maskelynes"}, ["klw"] = {"Tado", "Lindu"}, ["klx"] = {"Koluwawa"}, ["kly"] = {"Kalao"}, ["klz"] = {"Kabola"}, ["kma"] = {"Konni"}, ["kmb"] = {"Kimbundu"}, ["kmc"] = {"Southern Dong"}, ["kmd"] = {"Majukayang Kalinga"}, ["kme"] = {"Bakole"}, ["kmf"] = {"Kare (Papua New Guinea)"}, ["kmg"] = {"Kâte"}, ["kmh"] = {"Kalam"}, ["kmi"] = {"Kami (Nigeria)"}, ["kmj"] = {"Kumarbhag Paharia"}, ["kmk"] = {"Limos Kalinga"}, ["kml"] = {"Tanudan Kalinga"}, ["kmm"] = {"Kom (India)"}, ["kmn"] = {"Awtuw"}, ["kmo"] = {"Kwoma"}, ["kmp"] = {"Gimme"}, ["kmq"] = {"Kwama"}, ["kmr"] = {"Northern Kurdish"}, ["kms"] = {"Kamasau"}, ["kmt"] = {"Kemtuik"}, ["kmu"] = {"Kanite"}, ["kmv"] = {"Karipúna Creole French"}, ["kmw"] = {"Komo (Democratic Republic of Congo)"}, ["kmx"] = {"Waboda"}, ["kmy"] = {"Koma"}, ["kmz"] = {"Khorasani Turkish"}, ["kna"] = {"Dera (Nigeria)"}, ["knb"] = {"Lubuagan Kalinga"}, ["knc"] = {"Central Kanuri"}, ["knd"] = {"Konda"}, ["kne"] = {"Kankanaey"}, ["knf"] = {"Mankanya"}, ["kng"] = {"Koongo"}, ["kni"] = {"Kanufi"}, ["knj"] = {"Western Kanjobal"}, ["knk"] = {"Kuranko"}, ["knl"] = {"Keninjal"}, ["knm"] = {"Kanamarí"}, ["knn"] = {"Konkani (individual language)"}, ["kno"] = {"Kono (Sierra Leone)"}, ["knp"] = {"Kwanja"}, ["knq"] = {"Kintaq"}, ["knr"] = {"Kaningra"}, ["kns"] = {"Kensiu"}, ["knt"] = {"Panoan Katukína"}, ["knu"] = {"Kono (Guinea)"}, ["knv"] = {"Tabo"}, ["knw"] = {"Kung-Ekoka"}, ["knx"] = {"Kendayan", "Salako"}, ["kny"] = {"Kanyok"}, ["knz"] = {"Kalamsé"}, ["koa"] = {"Konomala"}, ["koc"] = {"Kpati"}, ["kod"] = {"Kodi"}, ["koe"] = {"Kacipo-Bale Suri"}, ["kof"] = {"Kubi"}, ["kog"] = {"Cogui", "Kogi"}, ["koh"] = {"Koyo"}, ["koi"] = {"Komi-Permyak"}, ["kok"] = {"Konkani (macrolanguage)"}, ["kol"] = {"Kol (Papua New Guinea)"}, ["koo"] = {"Konzo"}, ["kop"] = {"Waube"}, ["koq"] = {"Kota (Gabon)"}, ["kos"] = {"Kosraean"}, ["kot"] = {"Lagwan"}, ["kou"] = {"Koke"}, ["kov"] = {"Kudu-Camo"}, ["kow"] = {"Kugama"}, ["koy"] = {"Koyukon"}, ["koz"] = {"Korak"}, ["kpa"] = {"Kutto"}, ["kpb"] = {"Mullu Kurumba"}, ["kpc"] = {"Curripaco"}, ["kpd"] = {"Koba"}, ["kpe"] = {"Kpelle"}, ["kpf"] = {"Komba"}, ["kpg"] = {"Kapingamarangi"}, ["kph"] = {"Kplang"}, ["kpi"] = {"Kofei"}, ["kpj"] = {"Karajá"}, ["kpk"] = {"Kpan"}, ["kpl"] = {"Kpala"}, ["kpm"] = {"Koho"}, ["kpn"] = {"Kepkiriwát"}, ["kpo"] = {"Ikposo"}, ["kpq"] = {"Korupun-Sela"}, ["kpr"] = {"Korafe-Yegha"}, ["kps"] = {"Tehit"}, ["kpt"] = {"Karata"}, ["kpu"] = {"Kafoa"}, ["kpv"] = {"Komi-Zyrian"}, ["kpw"] = {"Kobon"}, ["kpx"] = {"Mountain Koiali"}, ["kpy"] = {"Koryak"}, ["kpz"] = {"Kupsabiny"}, ["kqa"] = {"Mum"}, ["kqb"] = {"Kovai"}, ["kqc"] = {"Doromu-Koki"}, ["kqd"] = {"Koy Sanjaq Surat"}, ["kqe"] = {"Kalagan"}, ["kqf"] = {"Kakabai"}, ["kqg"] = {"Khe"}, ["kqh"] = {"Kisankasa"}, ["kqi"] = {"Koitabu"}, ["kqj"] = {"Koromira"}, ["kqk"] = {"Kotafon Gbe"}, ["kql"] = {"Kyenele"}, ["kqm"] = {"Khisa"}, ["kqn"] = {"Kaonde"}, ["kqo"] = {"Eastern Krahn"}, ["kqp"] = {"Kimré"}, ["kqq"] = {"Krenak"}, ["kqr"] = {"Kimaragang"}, ["kqs"] = {"Northern Kissi"}, ["kqt"] = {"Klias River Kadazan"}, ["kqu"] = {"Seroa"}, ["kqv"] = {"Okolod"}, ["kqw"] = {"Kandas"}, ["kqx"] = {"Mser"}, ["kqy"] = {"Koorete"}, ["kqz"] = {"Korana"}, ["kra"] = {"Kumhali"}, ["krb"] = {"Karkin"}, ["krc"] = {"Karachay-Balkar"}, ["krd"] = {"Kairui-Midiki"}, ["kre"] = {"Panará"}, ["krf"] = {"Koro (Vanuatu)"}, ["krh"] = {"Kurama"}, ["kri"] = {"Krio"}, ["krj"] = {"Kinaray-A"}, ["krk"] = {"Kerek"}, ["krl"] = {"Karelian"}, ["krn"] = {"Sapo"}, ["kro"] = {"Kru languages"}, ["krp"] = {"Durop"}, ["krr"] = {"Krung"}, ["krs"] = {"Gbaya (Sudan)"}, ["krt"] = {"Tumari Kanuri"}, ["kru"] = {"Kurukh"}, ["krv"] = {"Kavet"}, ["krw"] = {"Western Krahn"}, ["krx"] = {"Karon"}, ["kry"] = {"Kryts"}, ["krz"] = {"Sota Kanum"}, ["ksb"] = {"Shambala"}, ["ksc"] = {"Southern Kalinga"}, ["ksd"] = {"Kuanua"}, ["kse"] = {"Kuni"}, ["ksf"] = {"Bafia"}, ["ksg"] = {"Kusaghe"}, ["ksh"] = {"Kölsch"}, ["ksi"] = {"Krisa", "I'saka"}, ["ksj"] = {"Uare"}, ["ksk"] = {"Kansa"}, ["ksl"] = {"Kumalu"}, ["ksm"] = {"Kumba"}, ["ksn"] = {"Kasiguranin"}, ["kso"] = {"Kofa"}, ["ksp"] = {"Kaba"}, ["ksq"] = {"Kwaami"}, ["ksr"] = {"Borong"}, ["kss"] = {"Southern Kisi"}, ["kst"] = {"Winyé"}, ["ksu"] = {"Khamyang"}, ["ksv"] = {"Kusu"}, ["ksw"] = {"S'gaw Karen"}, ["ksx"] = {"Kedang"}, ["ksy"] = {"Kharia Thar"}, ["ksz"] = {"Kodaku"}, ["kta"] = {"Katua"}, ["ktb"] = {"Kambaata"}, ["ktc"] = {"Kholok"}, ["ktd"] = {"Kokata", "Kukatha"}, ["kte"] = {"Nubri"}, ["ktf"] = {"Kwami"}, ["ktg"] = {"Kalkutung"}, ["kth"] = {"Karanga"}, ["kti"] = {"North Muyu"}, ["ktj"] = {"Plapo Krumen"}, ["ktk"] = {"Kaniet"}, ["ktl"] = {"Koroshi"}, ["ktm"] = {"Kurti"}, ["ktn"] = {"Karitiâna"}, ["kto"] = {"Kuot"}, ["ktp"] = {"Kaduo"}, ["ktq"] = {"Katabaga"}, ["kts"] = {"South Muyu"}, ["ktt"] = {"Ketum"}, ["ktu"] = {"Kituba (Democratic Republic of Congo)"}, ["ktv"] = {"Eastern Katu"}, ["ktw"] = {"Kato"}, ["ktx"] = {"Kaxararí"}, ["kty"] = {"Kango (Bas-Uélé District)"}, ["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"}, ["kub"] = {"Kutep"}, ["kuc"] = {"Kwinsu"}, ["kud"] = {"'Auhelawa"}, ["kue"] = {"Kuman (Papua New Guinea)"}, ["kuf"] = {"Western Katu"}, ["kug"] = {"Kupa"}, ["kuh"] = {"Kushi"}, ["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"}, ["kuj"] = {"Kuria"}, ["kuk"] = {"Kepo'"}, ["kul"] = {"Kulere"}, ["kum"] = {"Kumyk"}, ["kun"] = {"Kunama"}, ["kuo"] = {"Kumukio"}, ["kup"] = {"Kunimaipa"}, ["kuq"] = {"Karipuna"}, ["kus"] = {"Kusaal"}, ["kut"] = {"Kutenai"}, ["kuu"] = {"Upper Kuskokwim"}, ["kuv"] = {"Kur"}, ["kuw"] = {"Kpagua"}, ["kux"] = {"Kukatja"}, ["kuy"] = {"Kuuku-Ya'u"}, ["kuz"] = {"Kunza"}, ["kva"] = {"Bagvalal"}, ["kvb"] = {"Kubu"}, ["kvc"] = {"Kove"}, ["kvd"] = {"Kui (Indonesia)"}, ["kve"] = {"Kalabakan"}, ["kvf"] = {"Kabalai"}, ["kvg"] = {"Kuni-Boazi"}, ["kvh"] = {"Komodo"}, ["kvi"] = {"Kwang"}, ["kvj"] = {"Psikye"}, ["kvk"] = {"Korean Sign Language"}, ["kvl"] = {"Kayaw"}, ["kvm"] = {"Kendem"}, ["kvn"] = {"Border Kuna"}, ["kvo"] = {"Dobel"}, ["kvp"] = {"Kompane"}, ["kvq"] = {"Geba Karen"}, ["kvr"] = {"Kerinci"}, ["kvt"] = {"Lahta Karen", "Lahta"}, ["kvu"] = {"Yinbaw Karen"}, ["kvv"] = {"Kola"}, ["kvw"] = {"Wersing"}, ["kvx"] = {"Parkari Koli"}, ["kvy"] = {"Yintale Karen", "Yintale"}, ["kvz"] = {"Tsakwambo", "Tsaukambo"}, ["kwa"] = {"Dâw"}, ["kwb"] = {"Kwa"}, ["kwc"] = {"Likwala"}, ["kwd"] = {"Kwaio"}, ["kwe"] = {"Kwerba"}, ["kwf"] = {"Kwara'ae"}, ["kwg"] = {"Sara Kaba Deme"}, ["kwh"] = {"Kowiai"}, ["kwi"] = {"Awa-Cuaiquer"}, ["kwj"] = {"Kwanga"}, ["kwk"] = {"Kwakiutl"}, ["kwl"] = {"Kofyar"}, ["kwm"] = {"Kwambi"}, ["kwn"] = {"Kwangali"}, ["kwo"] = {"Kwomtari"}, ["kwp"] = {"Kodia"}, ["kwr"] = {"Kwer"}, ["kws"] = {"Kwese"}, ["kwt"] = {"Kwesten"}, ["kwu"] = {"Kwakum"}, ["kwv"] = {"Sara Kaba Náà"}, ["kww"] = {"Kwinti"}, ["kwx"] = {"Khirwar"}, ["kwy"] = {"San Salvador Kongo"}, ["kwz"] = {"Kwadi"}, ["kxa"] = {"Kairiru"}, ["kxb"] = {"Krobu"}, ["kxc"] = {"Konso", "Khonso"}, ["kxd"] = {"Brunei"}, ["kxf"] = {"Manumanaw Karen", "Manumanaw"}, ["kxh"] = {"Karo (Ethiopia)"}, ["kxi"] = {"Keningau Murut"}, ["kxj"] = {"Kulfa"}, ["kxk"] = {"Zayein Karen"}, ["kxm"] = {"Northern Khmer"}, ["kxn"] = {"Kanowit-Tanjong Melanau"}, ["kxo"] = {"Kanoé"}, ["kxp"] = {"Wadiyara Koli"}, ["kxq"] = {"Smärky Kanum"}, ["kxr"] = {"Koro (Papua New Guinea)"}, ["kxs"] = {"Kangjia"}, ["kxt"] = {"Koiwat"}, ["kxv"] = {"Kuvi"}, ["kxw"] = {"Konai"}, ["kxx"] = {"Likuba"}, ["kxy"] = {"Kayong"}, ["kxz"] = {"Kerewo"}, ["kya"] = {"Kwaya"}, ["kyb"] = {"Butbut Kalinga"}, ["kyc"] = {"Kyaka"}, ["kyd"] = {"Karey"}, ["kye"] = {"Krache"}, ["kyf"] = {"Kouya"}, ["kyg"] = {"Keyagana"}, ["kyh"] = {"Karok"}, ["kyi"] = {"Kiput"}, ["kyj"] = {"Karao"}, ["kyk"] = {"Kamayo"}, ["kyl"] = {"Kalapuya"}, ["kym"] = {"Kpatili"}, ["kyn"] = {"Northern Binukidnon"}, ["kyo"] = {"Kelon"}, ["kyp"] = {"Kang"}, ["kyq"] = {"Kenga"}, ["kyr"] = {"Kuruáya"}, ["kys"] = {"Baram Kayan"}, ["kyt"] = {"Kayagar"}, ["kyu"] = {"Western Kayah"}, ["kyv"] = {"Kayort"}, ["kyw"] = {"Kudmali"}, ["kyx"] = {"Rapoisi"}, ["kyy"] = {"Kambaira"}, ["kyz"] = {"Kayabí"}, ["kza"] = {"Western Karaboro"}, ["kzb"] = {"Kaibobo"}, ["kzc"] = {"Bondoukou Kulango"}, ["kzd"] = {"Kadai"}, ["kze"] = {"Kosena"}, ["kzf"] = {"Da'a Kaili"}, ["kzg"] = {"Kikai"}, ["kzi"] = {"Kelabit"}, ["kzk"] = {"Kazukuru"}, ["kzl"] = {"Kayeli"}, ["kzm"] = {"Kais"}, ["kzn"] = {"Kokola"}, ["kzo"] = {"Kaningi"}, ["kzp"] = {"Kaidipang"}, ["kzq"] = {"Kaike"}, ["kzr"] = {"Karang"}, ["kzs"] = {"Sugut Dusun"}, ["kzu"] = {"Kayupulau"}, ["kzv"] = {"Komyandaret"}, ["kzw"] = {"Karirí-Xocó"}, ["kzx"] = {"Kamarian"}, ["kzy"] = {"Kango (Tshopo District)"}, ["kzz"] = {"Kalabra"}, ["laa"] = {"Southern Subanen"}, ["lab"] = {"Linear A"}, ["lac"] = {"Lacandon"}, ["lad"] = {"Ladino"}, ["lae"] = {"Pattani"}, ["laf"] = {"Lafofa"}, ["lag"] = {"Rangi"}, ["lah"] = {"Lahnda"}, ["lai"] = {"Lambya"}, ["laj"] = {"Lango (Uganda)"}, ["lal"] = {"Lalia"}, ["lam"] = {"Lamba"}, ["lan"] = {"Laru"}, ["lap"] = {"Laka (Chad)"}, ["laq"] = {"Qabiao"}, ["lar"] = {"Larteh"}, ["las"] = {"Lama (Togo)"}, ["lau"] = {"Laba"}, ["law"] = {"Lauje"}, ["lax"] = {"Tiwa"}, ["lay"] = {"Lama Bai"}, ["laz"] = {"Aribwatsa"}, ["lbb"] = {"Label"}, ["lbc"] = {"Lakkia"}, ["lbe"] = {"Lak"}, ["lbf"] = {"Tinani"}, ["lbg"] = {"Laopang"}, ["lbi"] = {"La'bi"}, ["lbj"] = {"Ladakhi"}, ["lbk"] = {"Central Bontok"}, ["lbl"] = {"Libon Bikol"}, ["lbm"] = {"Lodhi"}, ["lbn"] = {"Rmeet"}, ["lbo"] = {"Laven"}, ["lbq"] = {"Wampar"}, ["lbr"] = {"Lohorung"}, ["lbs"] = {"Libyan Sign Language"}, ["lbt"] = {"Lachi"}, ["lbu"] = {"Labu"}, ["lbv"] = {"Lavatbura-Lamusong"}, ["lbw"] = {"Tolaki"}, ["lbx"] = {"Lawangan"}, ["lby"] = {"Lamalama", "Lamu-Lamu"}, ["lbz"] = {"Lardil"}, ["lcc"] = {"Legenyem"}, ["lcd"] = {"Lola"}, ["lce"] = {"Loncong", "Sekak"}, ["lcf"] = {"Lubu"}, ["lch"] = {"Luchazi"}, ["lcl"] = {"Lisela"}, ["lcm"] = {"Tungag"}, ["lcp"] = {"Western Lawa"}, ["lcq"] = {"Luhu"}, ["lcs"] = {"Lisabata-Nuniali"}, ["lda"] = {"Kla-Dan"}, ["ldb"] = {"Dũya"}, ["ldd"] = {"Luri"}, ["ldg"] = {"Lenyima"}, ["ldh"] = {"Lamja-Dengsa-Tola"}, ["ldi"] = {"Laari"}, ["ldj"] = {"Lemoro"}, ["ldk"] = {"Leelau"}, ["ldl"] = {"Kaan"}, ["ldm"] = {"Landoma"}, ["ldn"] = {"Láadan"}, ["ldo"] = {"Loo"}, ["ldp"] = {"Tso"}, ["ldq"] = {"Lufu"}, ["lea"] = {"Lega-Shabunda"}, ["leb"] = {"Lala-Bisa"}, ["lec"] = {"Leco"}, ["led"] = {"Lendu"}, ["lee"] = {"Lyélé"}, ["lef"] = {"Lelemi"}, ["leh"] = {"Lenje"}, ["lei"] = {"Lemio"}, ["lej"] = {"Lengola"}, ["lek"] = {"Leipon"}, ["lel"] = {"Lele (Democratic Republic of Congo)"}, ["lem"] = {"Nomaande"}, ["len"] = {"Lenca"}, ["leo"] = {"Leti (Cameroon)"}, ["lep"] = {"Lepcha"}, ["leq"] = {"Lembena"}, ["ler"] = {"Lenkau"}, ["les"] = {"Lese"}, ["let"] = {"Lesing-Gelimi", "Amio-Gelimi"}, ["leu"] = {"Kara (Papua New Guinea)"}, ["lev"] = {"Lamma"}, ["lew"] = {"Ledo Kaili"}, ["lex"] = {"Luang"}, ["ley"] = {"Lemolang"}, ["lez"] = {"Lezghian"}, ["lfa"] = {"Lefa"}, ["lfn"] = {"Lingua Franca Nova"}, ["lga"] = {"Lungga"}, ["lgb"] = {"Laghu"}, ["lgg"] = {"Lugbara"}, ["lgh"] = {"Laghuu"}, ["lgi"] = {"Lengilu"}, ["lgk"] = {"Lingarak", "Neverver"}, ["lgl"] = {"Wala"}, ["lgm"] = {"Lega-Mwenga"}, ["lgn"] = {"T'apo", "Opuuo"}, ["lgo"] = {"Lango (South Sudan)"}, ["lgq"] = {"Logba"}, ["lgr"] = {"Lengo"}, ["lgs"] = {"Guinea-Bissau Sign Language", "Língua Gestual Guineense"}, ["lgt"] = {"Pahi"}, ["lgu"] = {"Longgu"}, ["lgz"] = {"Ligenza"}, ["lha"] = {"Laha (Viet Nam)"}, ["lhh"] = {"Laha (Indonesia)"}, ["lhi"] = {"Lahu Shi"}, ["lhl"] = {"Lahul Lohar"}, ["lhm"] = {"Lhomi"}, ["lhn"] = {"Lahanan"}, ["lhp"] = {"Lhokpu"}, ["lhs"] = {"Mlahsö"}, ["lht"] = {"Lo-Toga"}, ["lhu"] = {"Lahu"}, ["lia"] = {"West-Central Limba"}, ["lib"] = {"Likum"}, ["lic"] = {"Hlai"}, ["lid"] = {"Nyindrou"}, ["lie"] = {"Likila"}, ["lif"] = {"Limbu"}, ["lig"] = {"Ligbi"}, ["lih"] = {"Lihir"}, ["lij"] = {"Ligurian"}, ["lik"] = {"Lika"}, ["lil"] = {"Lillooet"}, ["lio"] = {"Liki"}, ["lip"] = {"Sekpele"}, ["liq"] = {"Libido"}, ["lir"] = {"Liberian English"}, ["lis"] = {"Lisu"}, ["liu"] = {"Logorik"}, ["liv"] = {"Liv"}, ["liw"] = {"Col"}, ["lix"] = {"Liabuku"}, ["liy"] = {"Banda-Bambari"}, ["liz"] = {"Libinza"}, ["lja"] = {"Golpa"}, ["lje"] = {"Rampi"}, ["lji"] = {"Laiyolo"}, ["ljl"] = {"Li'o"}, ["ljp"] = {"Lampung Api"}, ["ljw"] = {"Yirandali"}, ["ljx"] = {"Yuru"}, ["lka"] = {"Lakalei"}, ["lkb"] = {"Kabras", "Lukabaras"}, ["lkc"] = {"Kucong"}, ["lkd"] = {"Lakondê"}, ["lke"] = {"Kenyi"}, ["lkh"] = {"Lakha"}, ["lki"] = {"Laki"}, ["lkj"] = {"Remun"}, ["lkl"] = {"Laeko-Libuat"}, ["lkm"] = {"Kalaamaya"}, ["lkn"] = {"Lakon", "Vure"}, ["lko"] = {"Khayo", "Olukhayo"}, ["lkr"] = {"Päri"}, ["lks"] = {"Kisa", "Olushisa"}, ["lkt"] = {"Lakota"}, ["lku"] = {"Kungkari"}, ["lky"] = {"Lokoya"}, ["lla"] = {"Lala-Roba"}, ["llb"] = {"Lolo"}, ["llc"] = {"Lele (Guinea)"}, ["lld"] = {"Ladin"}, ["lle"] = {"Lele (Papua New Guinea)"}, ["llf"] = {"Hermit"}, ["llg"] = {"Lole"}, ["llh"] = {"Lamu"}, ["lli"] = {"Teke-Laali"}, ["llj"] = {"Ladji Ladji"}, ["llk"] = {"Lelak"}, ["lll"] = {"Lilau"}, ["llm"] = {"Lasalimu"}, ["lln"] = {"Lele (Chad)"}, ["llp"] = {"North Efate"}, ["llq"] = {"Lolak"}, ["lls"] = {"Lithuanian Sign Language"}, ["llu"] = {"Lau"}, ["llx"] = {"Lauan"}, ["lma"] = {"East Limba"}, ["lmb"] = {"Merei"}, ["lmc"] = {"Limilngan"}, ["lmd"] = {"Lumun"}, ["lme"] = {"Pévé"}, ["lmf"] = {"South Lembata"}, ["lmg"] = {"Lamogai"}, ["lmh"] = {"Lambichhong"}, ["lmi"] = {"Lombi"}, ["lmj"] = {"West Lembata"}, ["lmk"] = {"Lamkang"}, ["lml"] = {"Hano"}, ["lmn"] = {"Lambadi"}, ["lmo"] = {"Lombard"}, ["lmp"] = {"Limbum"}, ["lmq"] = {"Lamatuka"}, ["lmr"] = {"Lamalera"}, ["lmu"] = {"Lamenu"}, ["lmv"] = {"Lomaiviti"}, ["lmw"] = {"Lake Miwok"}, ["lmx"] = {"Laimbue"}, ["lmy"] = {"Lamboya"}, ["lna"] = {"Langbashe"}, ["lnb"] = {"Mbalanhu"}, ["lnd"] = {"Lundayeh", "Lun Bawang"}, ["lng"] = {"Langobardic"}, ["lnh"] = {"Lanoh"}, ["lni"] = {"Daantanai'"}, ["lnj"] = {"Leningitij"}, ["lnl"] = {"South Central Banda"}, ["lnm"] = {"Langam"}, ["lnn"] = {"Lorediakarkar"}, ["lns"] = {"Lamnso'"}, ["lnu"] = {"Longuda"}, ["lnw"] = {"Lanima"}, ["lnz"] = {"Lonzo"}, ["loa"] = {"Loloda"}, ["lob"] = {"Lobi"}, ["loc"] = {"Inonhan"}, ["loe"] = {"Saluan"}, ["lof"] = {"Logol"}, ["log"] = {"Logo"}, ["loh"] = {"Laarim", "Narim"}, ["loi"] = {"Loma (Côte d'Ivoire)"}, ["loj"] = {"Lou"}, ["lok"] = {"Loko"}, ["lol"] = {"Mongo"}, ["lom"] = {"Loma (Liberia)"}, ["lon"] = {"Malawi Lomwe"}, ["loo"] = {"Lombo"}, ["lop"] = {"Lopa"}, ["loq"] = {"Lobala"}, ["lor"] = {"Téén"}, ["los"] = {"Loniu"}, ["lot"] = {"Otuho"}, ["lou"] = {"Louisiana Creole"}, ["lov"] = {"Lopi"}, ["low"] = {"Tampias Lobu"}, ["lox"] = {"Loun"}, ["loy"] = {"Loke"}, ["loz"] = {"Lozi"}, ["lpa"] = {"Lelepa"}, ["lpe"] = {"Lepki"}, ["lpn"] = {"Long Phuri Naga"}, ["lpo"] = {"Lipo"}, ["lpx"] = {"Lopit"}, ["lqr"] = {"Logir"}, ["lra"] = {"Rara Bakati'"}, ["lrc"] = {"Northern Luri"}, ["lre"] = {"Laurentian"}, ["lrg"] = {"Laragia"}, ["lri"] = {"Marachi", "Olumarachi"}, ["lrk"] = {"Loarki"}, ["lrl"] = {"Lari"}, ["lrm"] = {"Marama", "Olumarama"}, ["lrn"] = {"Lorang"}, ["lro"] = {"Laro"}, ["lrr"] = {"Southern Yamphu"}, ["lrt"] = {"Larantuka Malay"}, ["lrv"] = {"Larevat"}, ["lrz"] = {"Lemerig"}, ["lsa"] = {"Lasgerdi"}, ["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"}, ["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"}, ["lsd"] = {"Lishana Deni"}, ["lse"] = {"Lusengo"}, ["lsh"] = {"Lish"}, ["lsi"] = {"Lashi"}, ["lsl"] = {"Latvian Sign Language"}, ["lsm"] = {"Saamia", "Olusamia"}, ["lsn"] = {"Tibetan Sign Language"}, ["lso"] = {"Laos Sign Language"}, ["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"}, ["lsr"] = {"Aruop"}, ["lss"] = {"Lasi"}, ["lst"] = {"Trinidad and Tobago Sign Language"}, ["lsv"] = {"Sivia Sign Language"}, ["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"}, ["lsy"] = {"Mauritian Sign Language"}, ["ltc"] = {"Late Middle Chinese"}, ["ltg"] = {"Latgalian"}, ["lth"] = {"Thur"}, ["lti"] = {"Leti (Indonesia)"}, ["ltn"] = {"Latundê"}, ["lto"] = {"Tsotso", "Olutsotso"}, ["lts"] = {"Tachoni", "Lutachoni"}, ["ltu"] = {"Latu"}, ["lua"] = {"Luba-Lulua"}, ["luc"] = {"Aringa"}, ["lud"] = {"Ludian"}, ["lue"] = {"Luvale"}, ["luf"] = {"Laua"}, ["lui"] = {"Luiseno"}, ["luj"] = {"Luna"}, ["luk"] = {"Lunanakha"}, ["lul"] = {"Olu'bo"}, ["lum"] = {"Luimbi"}, ["lun"] = {"Lunda"}, ["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"}, ["lup"] = {"Lumbu"}, ["luq"] = {"Lucumi"}, ["lur"] = {"Laura"}, ["lus"] = {"Lushai"}, ["lut"] = {"Lushootseed"}, ["luu"] = {"Lumba-Yakkha"}, ["luv"] = {"Luwati"}, ["luw"] = {"Luo (Cameroon)"}, ["luy"] = {"Luyia", "Oluluyia"}, ["luz"] = {"Southern Luri"}, ["lva"] = {"Maku'a"}, ["lvi"] = {"Lavi"}, ["lvk"] = {"Lavukaleve"}, ["lvl"] = {"Lwel"}, ["lvs"] = {"Standard Latvian"}, ["lvu"] = {"Levuka"}, ["lwa"] = {"Lwalu"}, ["lwe"] = {"Lewo Eleng"}, ["lwg"] = {"Wanga", "Oluwanga"}, ["lwh"] = {"White Lachi"}, ["lwl"] = {"Eastern Lawa"}, ["lwm"] = {"Laomian"}, ["lwo"] = {"Luwo"}, ["lws"] = {"Malawian Sign Language"}, ["lwt"] = {"Lewotobi"}, ["lwu"] = {"Lawu"}, ["lww"] = {"Lewo"}, ["lxm"] = {"Lakurumau"}, ["lya"] = {"Layakha"}, ["lyg"] = {"Lyngngam"}, ["lyn"] = {"Luyana"}, ["lzh"] = {"Literary Chinese"}, ["lzl"] = {"Litzlitz"}, ["lzn"] = {"Leinong Naga"}, ["lzz"] = {"Laz"}, ["maa"] = {"San Jerónimo Tecóatl Mazatec"}, ["mab"] = {"Yutanduchi Mixtec"}, ["mad"] = {"Madurese"}, ["mae"] = {"Bo-Rukul"}, ["maf"] = {"Mafa"}, ["mag"] = {"Magahi"}, ["mai"] = {"Maithili"}, ["maj"] = {"Jalapa De Díaz Mazatec"}, ["mak"] = {"Makasar"}, ["mam"] = {"Mam"}, ["man"] = {"Mandingo", "Manding"}, ["map"] = {"Austronesian languages"}, ["maq"] = {"Chiquihuitlán Mazatec"}, ["mas"] = {"Masai"}, ["mat"] = {"San Francisco Matlatzinca"}, ["mau"] = {"Huautla Mazatec"}, ["mav"] = {"Sateré-Mawé"}, ["maw"] = {"Mampruli"}, ["max"] = {"North Moluccan Malay"}, ["maz"] = {"Central Mazahua"}, ["mba"] = {"Higaonon"}, ["mbb"] = {"Western Bukidnon Manobo"}, ["mbc"] = {"Macushi"}, ["mbd"] = {"Dibabawon Manobo"}, ["mbe"] = {"Molale"}, ["mbf"] = {"Baba Malay"}, ["mbh"] = {"Mangseng"}, ["mbi"] = {"Ilianen Manobo"}, ["mbj"] = {"Nadëb"}, ["mbk"] = {"Malol"}, ["mbl"] = {"Maxakalí"}, ["mbm"] = {"Ombamba"}, ["mbn"] = {"Macaguán"}, ["mbo"] = {"Mbo (Cameroon)"}, ["mbp"] = {"Malayo"}, ["mbq"] = {"Maisin"}, ["mbr"] = {"Nukak Makú"}, ["mbs"] = {"Sarangani Manobo"}, ["mbt"] = {"Matigsalug Manobo"}, ["mbu"] = {"Mbula-Bwazza"}, ["mbv"] = {"Mbulungish"}, ["mbw"] = {"Maring"}, ["mbx"] = {"Mari (East Sepik Province)"}, ["mby"] = {"Memoni"}, ["mbz"] = {"Amoltepec Mixtec"}, ["mca"] = {"Maca"}, ["mcb"] = {"Machiguenga"}, ["mcc"] = {"Bitur"}, ["mcd"] = {"Sharanahua"}, ["mce"] = {"Itundujia Mixtec"}, ["mcf"] = {"Matsés"}, ["mcg"] = {"Mapoyo"}, ["mch"] = {"Maquiritari"}, ["mci"] = {"Mese"}, ["mcj"] = {"Mvanip"}, ["mck"] = {"Mbunda"}, ["mcl"] = {"Macaguaje"}, ["mcm"] = {"Malaccan Creole Portuguese"}, ["mcn"] = {"Masana"}, ["mco"] = {"Coatlán Mixe"}, ["mcp"] = {"Makaa"}, ["mcq"] = {"Ese"}, ["mcr"] = {"Menya"}, ["mcs"] = {"Mambai"}, ["mct"] = {"Mengisa"}, ["mcu"] = {"Cameroon Mambila"}, ["mcv"] = {"Minanibai"}, ["mcw"] = {"Mawa (Chad)"}, ["mcx"] = {"Mpiemo"}, ["mcy"] = {"South Watut"}, ["mcz"] = {"Mawan"}, ["mda"] = {"Mada (Nigeria)"}, ["mdb"] = {"Morigi"}, ["mdc"] = {"Male (Papua New Guinea)"}, ["mdd"] = {"Mbum"}, ["mde"] = {"Maba (Chad)"}, ["mdf"] = {"Moksha"}, ["mdg"] = {"Massalat"}, ["mdh"] = {"Maguindanaon"}, ["mdi"] = {"Mamvu"}, ["mdj"] = {"Mangbetu"}, ["mdk"] = {"Mangbutu"}, ["mdl"] = {"Maltese Sign Language"}, ["mdm"] = {"Mayogo"}, ["mdn"] = {"Mbati"}, ["mdp"] = {"Mbala"}, ["mdq"] = {"Mbole"}, ["mdr"] = {"Mandar"}, ["mds"] = {"Maria (Papua New Guinea)"}, ["mdt"] = {"Mbere"}, ["mdu"] = {"Mboko"}, ["mdv"] = {"Santa Lucía Monteverde Mixtec"}, ["mdw"] = {"Mbosi"}, ["mdx"] = {"Dizin"}, ["mdy"] = {"Male (Ethiopia)"}, ["mdz"] = {"Suruí Do Pará"}, ["mea"] = {"Menka"}, ["meb"] = {"Ikobi"}, ["mec"] = {"Marra"}, ["med"] = {"Melpa"}, ["mee"] = {"Mengen"}, ["mef"] = {"Megam"}, ["meh"] = {"Southwestern Tlaxiaco Mixtec"}, ["mei"] = {"Midob"}, ["mej"] = {"Meyah"}, ["mek"] = {"Mekeo"}, ["mel"] = {"Central Melanau"}, ["mem"] = {"Mangala"}, ["men"] = {"Mende (Sierra Leone)"}, ["meo"] = {"Kedah Malay"}, ["mep"] = {"Miriwoong"}, ["meq"] = {"Merey"}, ["mer"] = {"Meru"}, ["mes"] = {"Masmaje"}, ["met"] = {"Mato"}, ["meu"] = {"Motu"}, ["mev"] = {"Mano"}, ["mew"] = {"Maaka"}, ["mey"] = {"Hassaniyya"}, ["mez"] = {"Menominee"}, ["mfa"] = {"Pattani Malay"}, ["mfb"] = {"Bangka"}, ["mfc"] = {"Mba"}, ["mfd"] = {"Mendankwe-Nkwen"}, ["mfe"] = {"Morisyen"}, ["mff"] = {"Naki"}, ["mfg"] = {"Mogofin"}, ["mfh"] = {"Matal"}, ["mfi"] = {"Wandala"}, ["mfj"] = {"Mefele"}, ["mfk"] = {"North Mofu"}, ["mfl"] = {"Putai"}, ["mfm"] = {"Marghi South"}, ["mfn"] = {"Cross River Mbembe"}, ["mfo"] = {"Mbe"}, ["mfp"] = {"Makassar Malay"}, ["mfq"] = {"Moba"}, ["mfr"] = {"Marrithiyel"}, ["mfs"] = {"Mexican Sign Language"}, ["mft"] = {"Mokerang"}, ["mfu"] = {"Mbwela"}, ["mfv"] = {"Mandjak"}, ["mfw"] = {"Mulaha"}, ["mfx"] = {"Melo"}, ["mfy"] = {"Mayo"}, ["mfz"] = {"Mabaan"}, ["mga"] = {"Middle Irish (900-1200)"}, ["mgb"] = {"Mararit"}, ["mgc"] = {"Morokodo"}, ["mgd"] = {"Moru"}, ["mge"] = {"Mango"}, ["mgf"] = {"Maklew"}, ["mgg"] = {"Mpumpong"}, ["mgh"] = {"Makhuwa-Meetto"}, ["mgi"] = {"Lijili"}, ["mgj"] = {"Abureni"}, ["mgk"] = {"Mawes"}, ["mgl"] = {"Maleu-Kilenge"}, ["mgm"] = {"Mambae"}, ["mgn"] = {"Mbangi"}, ["mgo"] = {"Meta'"}, ["mgp"] = {"Eastern Magar"}, ["mgq"] = {"Malila"}, ["mgr"] = {"Mambwe-Lungu"}, ["mgs"] = {"Manda (Tanzania)"}, ["mgt"] = {"Mongol"}, ["mgu"] = {"Mailu"}, ["mgv"] = {"Matengo"}, ["mgw"] = {"Matumbi"}, ["mgy"] = {"Mbunga"}, ["mgz"] = {"Mbugwe"}, ["mha"] = {"Manda (India)"}, ["mhb"] = {"Mahongwe"}, ["mhc"] = {"Mocho"}, ["mhd"] = {"Mbugu"}, ["mhe"] = {"Besisi", "Mah Meri"}, ["mhf"] = {"Mamaa"}, ["mhg"] = {"Margu"}, ["mhi"] = {"Ma'di"}, ["mhj"] = {"Mogholi"}, ["mhk"] = {"Mungaka"}, ["mhl"] = {"Mauwake"}, ["mhm"] = {"Makhuwa-Moniga"}, ["mhn"] = {"Mócheno"}, ["mho"] = {"Mashi (Zambia)"}, ["mhp"] = {"Balinese Malay"}, ["mhq"] = {"Mandan"}, ["mhr"] = {"Eastern Mari"}, ["mhs"] = {"Buru (Indonesia)"}, ["mht"] = {"Mandahuaca"}, ["mhu"] = {"Digaro-Mishmi", "Darang Deng"}, ["mhw"] = {"Mbukushu"}, ["mhx"] = {"Maru", "Lhaovo"}, ["mhy"] = {"Ma'anyan"}, ["mhz"] = {"Mor (Mor Islands)"}, ["mia"] = {"Miami"}, ["mib"] = {"Atatláhuca Mixtec"}, ["mic"] = {"Mi'kmaq", "Micmac"}, ["mid"] = {"Mandaic"}, ["mie"] = {"Ocotepec Mixtec"}, ["mif"] = {"Mofu-Gudur"}, ["mig"] = {"San Miguel El Grande Mixtec"}, ["mih"] = {"Chayuco Mixtec"}, ["mii"] = {"Chigmecatitlán Mixtec"}, ["mij"] = {"Abar", "Mungbam"}, ["mik"] = {"Mikasuki"}, ["mil"] = {"Peñoles Mixtec"}, ["mim"] = {"Alacatlatzala Mixtec"}, ["min"] = {"Minangkabau"}, ["mio"] = {"Pinotepa Nacional Mixtec"}, ["mip"] = {"Apasco-Apoala Mixtec"}, ["miq"] = {"Mískito"}, ["mir"] = {"Isthmus Mixe"}, ["mis"] = {"Uncoded languages"}, ["mit"] = {"Southern Puebla Mixtec"}, ["miu"] = {"Cacaloxtepec Mixtec"}, ["miw"] = {"Akoye"}, ["mix"] = {"Mixtepec Mixtec"}, ["miy"] = {"Ayutla Mixtec"}, ["miz"] = {"Coatzospan Mixtec"}, ["mjb"] = {"Makalero"}, ["mjc"] = {"San Juan Colorado Mixtec"}, ["mjd"] = {"Northwest Maidu"}, ["mje"] = {"Muskum"}, ["mjg"] = {"Tu"}, ["mjh"] = {"Mwera (Nyasa)"}, ["mji"] = {"Kim Mun"}, ["mjj"] = {"Mawak"}, ["mjk"] = {"Matukar"}, ["mjl"] = {"Mandeali"}, ["mjm"] = {"Medebur"}, ["mjn"] = {"Ma (Papua New Guinea)"}, ["mjo"] = {"Malankuravan"}, ["mjp"] = {"Malapandaram"}, ["mjq"] = {"Malaryan"}, ["mjr"] = {"Malavedan"}, ["mjs"] = {"Miship"}, ["mjt"] = {"Sauria Paharia"}, ["mju"] = {"Manna-Dora"}, ["mjv"] = {"Mannan"}, ["mjw"] = {"Karbi"}, ["mjx"] = {"Mahali"}, ["mjy"] = {"Mahican"}, ["mjz"] = {"Majhi"}, ["mka"] = {"Mbre"}, ["mkb"] = {"Mal Paharia"}, ["mkc"] = {"Siliput"}, ["mke"] = {"Mawchi"}, ["mkf"] = {"Miya"}, ["mkg"] = {"Mak (China)"}, ["mkh"] = {"Mon-Khmer languages"}, ["mki"] = {"Dhatki"}, ["mkj"] = {"Mokilese"}, ["mkk"] = {"Byep"}, ["mkl"] = {"Mokole"}, ["mkm"] = {"Moklen"}, ["mkn"] = {"Kupang Malay"}, ["mko"] = {"Mingang Doso"}, ["mkp"] = {"Moikodi"}, ["mkq"] = {"Bay Miwok"}, ["mkr"] = {"Malas"}, ["mks"] = {"Silacayoapan Mixtec"}, ["mkt"] = {"Vamale"}, ["mku"] = {"Konyanka Maninka"}, ["mkv"] = {"Mafea"}, ["mkw"] = {"Kituba (Congo)"}, ["mkx"] = {"Kinamiging Manobo"}, ["mky"] = {"East Makian"}, ["mkz"] = {"Makasae"}, ["mla"] = {"Malo"}, ["mlb"] = {"Mbule"}, ["mlc"] = {"Cao Lan"}, ["mle"] = {"Manambu"}, ["mlf"] = {"Mal"}, ["mlh"] = {"Mape"}, ["mli"] = {"Malimpung"}, ["mlj"] = {"Miltu"}, ["mlk"] = {"Ilwana", "Kiwilwana"}, ["mll"] = {"Malua Bay"}, ["mlm"] = {"Mulam"}, ["mln"] = {"Malango"}, ["mlo"] = {"Mlomp"}, ["mlp"] = {"Bargam"}, ["mlq"] = {"Western Maninkakan"}, ["mlr"] = {"Vame"}, ["mls"] = {"Masalit"}, ["mlu"] = {"To'abaita"}, ["mlv"] = {"Motlav", "Mwotlap"}, ["mlw"] = {"Moloko"}, ["mlx"] = {"Malfaxal", "Naha'ai"}, ["mlz"] = {"Malaynon"}, ["mma"] = {"Mama"}, ["mmb"] = {"Momina"}, ["mmc"] = {"Michoacán Mazahua"}, ["mmd"] = {"Maonan"}, ["mme"] = {"Mae"}, ["mmf"] = {"Mundat"}, ["mmg"] = {"North Ambrym"}, ["mmh"] = {"Mehináku"}, ["mmi"] = {"Musar"}, ["mmj"] = {"Majhwar"}, ["mmk"] = {"Mukha-Dora"}, ["mml"] = {"Man Met"}, ["mmm"] = {"Maii"}, ["mmn"] = {"Mamanwa"}, ["mmo"] = {"Mangga Buang"}, ["mmp"] = {"Siawi"}, ["mmq"] = {"Musak"}, ["mmr"] = {"Western Xiangxi Miao"}, ["mmt"] = {"Malalamai"}, ["mmu"] = {"Mmaala"}, ["mmv"] = {"Miriti"}, ["mmw"] = {"Emae"}, ["mmx"] = {"Madak"}, ["mmy"] = {"Migaama"}, ["mmz"] = {"Mabaale"}, ["mna"] = {"Mbula"}, ["mnb"] = {"Muna"}, ["mnc"] = {"Manchu"}, ["mnd"] = {"Mondé"}, ["mne"] = {"Naba"}, ["mnf"] = {"Mundani"}, ["mng"] = {"Eastern Mnong"}, ["mnh"] = {"Mono (Democratic Republic of Congo)"}, ["mni"] = {"Manipuri"}, ["mnj"] = {"Munji"}, ["mnk"] = {"Mandinka"}, ["mnl"] = {"Tiale"}, ["mnm"] = {"Mapena"}, ["mnn"] = {"Southern Mnong"}, ["mno"] = {"Manobo languages"}, ["mnp"] = {"Min Bei Chinese"}, ["mnq"] = {"Minriq"}, ["mnr"] = {"Mono (USA)"}, ["mns"] = {"Mansi"}, ["mnu"] = {"Mer"}, ["mnv"] = {"Rennell-Bellona"}, ["mnw"] = {"Mon"}, ["mnx"] = {"Manikion"}, ["mny"] = {"Manyawa"}, ["mnz"] = {"Moni"}, ["moa"] = {"Mwan"}, ["moc"] = {"Mocoví"}, ["mod"] = {"Mobilian"}, ["moe"] = {"Innu", "Montagnais"}, ["mog"] = {"Mongondow"}, ["moh"] = {"Mohawk"}, ["moi"] = {"Mboi"}, ["moj"] = {"Monzombo"}, ["mok"] = {"Morori"}, ["mom"] = {"Mangue"}, ["moo"] = {"Monom"}, ["mop"] = {"Mopán Maya"}, ["moq"] = {"Mor (Bomberai Peninsula)"}, ["mor"] = {"Moro"}, ["mos"] = {"Mossi"}, ["mot"] = {"Barí"}, ["mou"] = {"Mogum"}, ["mov"] = {"Mohave"}, ["mow"] = {"Moi (Congo)"}, ["mox"] = {"Molima"}, ["moy"] = {"Shekkacho"}, ["moz"] = {"Mukulu", "Gergiko"}, ["mpa"] = {"Mpoto"}, ["mpb"] = {"Malak Malak", "Mullukmulluk"}, ["mpc"] = {"Mangarrayi"}, ["mpd"] = {"Machinere"}, ["mpe"] = {"Majang"}, ["mpg"] = {"Marba"}, ["mph"] = {"Maung"}, ["mpi"] = {"Mpade"}, ["mpj"] = {"Martu Wangka", "Wangkajunga"}, ["mpk"] = {"Mbara (Chad)"}, ["mpl"] = {"Middle Watut"}, ["mpm"] = {"Yosondúa Mixtec"}, ["mpn"] = {"Mindiri"}, ["mpo"] = {"Miu"}, ["mpp"] = {"Migabac"}, ["mpq"] = {"Matís"}, ["mpr"] = {"Vangunu"}, ["mps"] = {"Dadibi"}, ["mpt"] = {"Mian"}, ["mpu"] = {"Makuráp"}, ["mpv"] = {"Mungkip"}, ["mpw"] = {"Mapidian"}, ["mpx"] = {"Misima-Panaeati"}, ["mpy"] = {"Mapia"}, ["mpz"] = {"Mpi"}, ["mqa"] = {"Maba (Indonesia)"}, ["mqb"] = {"Mbuko"}, ["mqc"] = {"Mangole"}, ["mqe"] = {"Matepi"}, ["mqf"] = {"Momuna"}, ["mqg"] = {"Kota Bangun Kutai Malay"}, ["mqh"] = {"Tlazoyaltepec Mixtec"}, ["mqi"] = {"Mariri"}, ["mqj"] = {"Mamasa"}, ["mqk"] = {"Rajah Kabunsuwan Manobo"}, ["mql"] = {"Mbelime"}, ["mqm"] = {"South Marquesan"}, ["mqn"] = {"Moronene"}, ["mqo"] = {"Modole"}, ["mqp"] = {"Manipa"}, ["mqq"] = {"Minokok"}, ["mqr"] = {"Mander"}, ["mqs"] = {"West Makian"}, ["mqt"] = {"Mok"}, ["mqu"] = {"Mandari"}, ["mqv"] = {"Mosimo"}, ["mqw"] = {"Murupi"}, ["mqx"] = {"Mamuju"}, ["mqy"] = {"Manggarai"}, ["mqz"] = {"Pano"}, ["mra"] = {"Mlabri"}, ["mrb"] = {"Marino"}, ["mrc"] = {"Maricopa"}, ["mrd"] = {"Western Magar"}, ["mre"] = {"Martha's Vineyard Sign Language"}, ["mrf"] = {"Elseng"}, ["mrg"] = {"Mising"}, ["mrh"] = {"Mara Chin"}, ["mrj"] = {"Western Mari"}, ["mrk"] = {"Hmwaveke"}, ["mrl"] = {"Mortlockese"}, ["mrm"] = {"Merlav", "Mwerlap"}, ["mrn"] = {"Cheke Holo"}, ["mro"] = {"Mru"}, ["mrp"] = {"Morouas"}, ["mrq"] = {"North Marquesan"}, ["mrr"] = {"Maria (India)"}, ["mrs"] = {"Maragus"}, ["mrt"] = {"Marghi Central"}, ["mru"] = {"Mono (Cameroon)"}, ["mrv"] = {"Mangareva"}, ["mrw"] = {"Maranao"}, ["mrx"] = {"Maremgi", "Dineor"}, ["mry"] = {"Mandaya"}, ["mrz"] = {"Marind"}, ["msb"] = {"Masbatenyo"}, ["msc"] = {"Sankaran Maninka"}, ["msd"] = {"Yucatec Maya Sign Language"}, ["mse"] = {"Musey"}, ["msf"] = {"Mekwei"}, ["msg"] = {"Moraid"}, ["msh"] = {"Masikoro Malagasy"}, ["msi"] = {"Sabah Malay"}, ["msj"] = {"Ma (Democratic Republic of Congo)"}, ["msk"] = {"Mansaka"}, ["msl"] = {"Molof", "Poule"}, ["msm"] = {"Agusan Manobo"}, ["msn"] = {"Vurës"}, ["mso"] = {"Mombum"}, ["msp"] = {"Maritsauá"}, ["msq"] = {"Caac"}, ["msr"] = {"Mongolian Sign Language"}, ["mss"] = {"West Masela"}, ["msu"] = {"Musom"}, ["msv"] = {"Maslam"}, ["msw"] = {"Mansoanka"}, ["msx"] = {"Moresada"}, ["msy"] = {"Aruamu"}, ["msz"] = {"Momare"}, ["mta"] = {"Cotabato Manobo"}, ["mtb"] = {"Anyin Morofo"}, ["mtc"] = {"Munit"}, ["mtd"] = {"Mualang"}, ["mte"] = {"Mono (Solomon Islands)"}, ["mtf"] = {"Murik (Papua New Guinea)"}, ["mtg"] = {"Una"}, ["mth"] = {"Munggui"}, ["mti"] = {"Maiwa (Papua New Guinea)"}, ["mtj"] = {"Moskona"}, ["mtk"] = {"Mbe'"}, ["mtl"] = {"Montol"}, ["mtm"] = {"Mator"}, ["mtn"] = {"Matagalpa"}, ["mto"] = {"Totontepec Mixe"}, ["mtp"] = {"Wichí Lhamtés Nocten"}, ["mtq"] = {"Muong"}, ["mtr"] = {"Mewari"}, ["mts"] = {"Yora"}, ["mtt"] = {"Mota"}, ["mtu"] = {"Tututepec Mixtec"}, ["mtv"] = {"Asaro'o"}, ["mtw"] = {"Southern Binukidnon"}, ["mtx"] = {"Tidaá Mixtec"}, ["mty"] = {"Nabi"}, ["mua"] = {"Mundang"}, ["mub"] = {"Mubi"}, ["muc"] = {"Ajumbu"}, ["mud"] = {"Mednyj Aleut"}, ["mue"] = {"Media Lengua"}, ["mug"] = {"Musgu"}, ["muh"] = {"Mündü"}, ["mui"] = {"Musi"}, ["muj"] = {"Mabire"}, ["muk"] = {"Mugom"}, ["mul"] = {"Multiple languages"}, ["mum"] = {"Maiwala"}, ["mun"] = {"Munda languages"}, ["muo"] = {"Nyong"}, ["mup"] = {"Malvi"}, ["muq"] = {"Eastern Xiangxi Miao"}, ["mur"] = {"Murle"}, ["mus"] = {"Creek"}, ["mut"] = {"Western Muria"}, ["muu"] = {"Yaaku"}, ["muv"] = {"Muthuvan"}, ["mux"] = {"Bo-Ung"}, ["muy"] = {"Muyang"}, ["muz"] = {"Mursi"}, ["mva"] = {"Manam"}, ["mvb"] = {"Mattole"}, ["mvd"] = {"Mamboru"}, ["mve"] = {"Marwari (Pakistan)"}, ["mvf"] = {"Peripheral Mongolian"}, ["mvg"] = {"Yucuañe Mixtec"}, ["mvh"] = {"Mulgi"}, ["mvi"] = {"Miyako"}, ["mvk"] = {"Mekmek"}, ["mvl"] = {"Mbara (Australia)"}, ["mvn"] = {"Minaveha"}, ["mvo"] = {"Marovo"}, ["mvp"] = {"Duri"}, ["mvq"] = {"Moere"}, ["mvr"] = {"Marau"}, ["mvs"] = {"Massep"}, ["mvt"] = {"Mpotovoro"}, ["mvu"] = {"Marfa"}, ["mvv"] = {"Tagal Murut"}, ["mvw"] = {"Machinga"}, ["mvx"] = {"Meoswar"}, ["mvy"] = {"Indus Kohistani"}, ["mvz"] = {"Mesqan"}, ["mwa"] = {"Mwatebu"}, ["mwb"] = {"Juwal"}, ["mwc"] = {"Are"}, ["mwe"] = {"Mwera (Chimwera)"}, ["mwf"] = {"Murrinh-Patha"}, ["mwg"] = {"Aiklep"}, ["mwh"] = {"Mouk-Aria"}, ["mwi"] = {"Labo", "Ninde"}, ["mwk"] = {"Kita Maninkakan"}, ["mwl"] = {"Mirandese"}, ["mwm"] = {"Sar"}, ["mwn"] = {"Nyamwanga"}, ["mwo"] = {"Central Maewo"}, ["mwp"] = {"Kala Lagaw Ya"}, ["mwq"] = {"Mün Chin"}, ["mwr"] = {"Marwari"}, ["mws"] = {"Mwimbi-Muthambi"}, ["mwt"] = {"Moken"}, ["mwu"] = {"Mittu"}, ["mwv"] = {"Mentawai"}, ["mww"] = {"Hmong Daw"}, ["mwz"] = {"Moingi"}, ["mxa"] = {"Northwest Oaxaca Mixtec"}, ["mxb"] = {"Tezoatlán Mixtec"}, ["mxc"] = {"Manyika"}, ["mxd"] = {"Modang"}, ["mxe"] = {"Mele-Fila"}, ["mxf"] = {"Malgbe"}, ["mxg"] = {"Mbangala"}, ["mxh"] = {"Mvuba"}, ["mxi"] = {"Mozarabic"}, ["mxj"] = {"Miju-Mishmi", "Geman Deng"}, ["mxk"] = {"Monumbo"}, ["mxl"] = {"Maxi Gbe"}, ["mxm"] = {"Meramera"}, ["mxn"] = {"Moi (Indonesia)"}, ["mxo"] = {"Mbowe"}, ["mxp"] = {"Tlahuitoltepec Mixe"}, ["mxq"] = {"Juquila Mixe"}, ["mxr"] = {"Murik (Malaysia)"}, ["mxs"] = {"Huitepec Mixtec"}, ["mxt"] = {"Jamiltepec Mixtec"}, ["mxu"] = {"Mada (Cameroon)"}, ["mxv"] = {"Metlatónoc Mixtec"}, ["mxw"] = {"Namo"}, ["mxx"] = {"Mahou", "Mawukakan"}, ["mxy"] = {"Southeastern Nochixtlán Mixtec"}, ["mxz"] = {"Central Masela"}, ["myb"] = {"Mbay"}, ["myc"] = {"Mayeka"}, ["mye"] = {"Myene"}, ["myf"] = {"Bambassi"}, ["myg"] = {"Manta"}, ["myh"] = {"Makah"}, ["myj"] = {"Mangayat"}, ["myk"] = {"Mamara Senoufo"}, ["myl"] = {"Moma"}, ["mym"] = {"Me'en"}, ["myn"] = {"Mayan languages"}, ["myo"] = {"Anfillo"}, ["myp"] = {"Pirahã"}, ["myr"] = {"Muniche"}, ["mys"] = {"Mesmes"}, ["myu"] = {"Mundurukú"}, ["myv"] = {"Erzya"}, ["myw"] = {"Muyuw"}, ["myx"] = {"Masaaba"}, ["myy"] = {"Macuna"}, ["myz"] = {"Classical Mandaic"}, ["mza"] = {"Santa María Zacatepec Mixtec"}, ["mzb"] = {"Tumzabt"}, ["mzc"] = {"Madagascar Sign Language"}, ["mzd"] = {"Malimba"}, ["mze"] = {"Morawa"}, ["mzg"] = {"Monastic Sign Language"}, ["mzh"] = {"Wichí Lhamtés Güisnay"}, ["mzi"] = {"Ixcatlán Mazatec"}, ["mzj"] = {"Manya"}, ["mzk"] = {"Nigeria Mambila"}, ["mzl"] = {"Mazatlán Mixe"}, ["mzm"] = {"Mumuye"}, ["mzn"] = {"Mazanderani"}, ["mzo"] = {"Matipuhy"}, ["mzp"] = {"Movima"}, ["mzq"] = {"Mori Atas"}, ["mzr"] = {"Marúbo"}, ["mzs"] = {"Macanese"}, ["mzt"] = {"Mintil"}, ["mzu"] = {"Inapang"}, ["mzv"] = {"Manza"}, ["mzw"] = {"Deg"}, ["mzx"] = {"Mawayana"}, ["mzy"] = {"Mozambican Sign Language"}, ["mzz"] = {"Maiadomu"}, ["naa"] = {"Namla"}, ["nab"] = {"Southern Nambikuára"}, ["nac"] = {"Narak"}, ["nae"] = {"Naka'ela"}, ["naf"] = {"Nabak"}, ["nag"] = {"Naga Pidgin"}, ["nah"] = {"Nahuatl languages"}, ["nai"] = {"North American Indian languages"}, ["naj"] = {"Nalu"}, ["nak"] = {"Nakanai"}, ["nal"] = {"Nalik"}, ["nam"] = {"Ngan'gityemerri"}, ["nan"] = {"Min Nan Chinese"}, ["nao"] = {"Naaba"}, ["nap"] = {"Neapolitan"}, ["naq"] = {"Khoekhoe", "Nama (Namibia)"}, ["nar"] = {"Iguta"}, ["nas"] = {"Naasioi"}, ["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"}, ["naw"] = {"Nawuri"}, ["nax"] = {"Nakwi"}, ["nay"] = {"Ngarrindjeri"}, ["naz"] = {"Coatepec Nahuatl"}, ["nba"] = {"Nyemba"}, ["nbb"] = {"Ndoe"}, ["nbc"] = {"Chang Naga"}, ["nbd"] = {"Ngbinda"}, ["nbe"] = {"Konyak Naga"}, ["nbg"] = {"Nagarchal"}, ["nbh"] = {"Ngamo"}, ["nbi"] = {"Mao Naga"}, ["nbj"] = {"Ngarinyman"}, ["nbk"] = {"Nake"}, ["nbm"] = {"Ngbaka Ma'bo"}, ["nbn"] = {"Kuri"}, ["nbo"] = {"Nkukoli"}, ["nbp"] = {"Nnam"}, ["nbq"] = {"Nggem"}, ["nbr"] = {"Numana"}, ["nbs"] = {"Namibian Sign Language"}, ["nbt"] = {"Na"}, ["nbu"] = {"Rongmei Naga"}, ["nbv"] = {"Ngamambo"}, ["nbw"] = {"Southern Ngbandi"}, ["nby"] = {"Ningera"}, ["nca"] = {"Iyo"}, ["ncb"] = {"Central Nicobarese"}, ["ncc"] = {"Ponam"}, ["ncd"] = {"Nachering"}, ["nce"] = {"Yale"}, ["ncf"] = {"Notsi"}, ["ncg"] = {"Nisga'a"}, ["nch"] = {"Central Huasteca Nahuatl"}, ["nci"] = {"Classical Nahuatl"}, ["ncj"] = {"Northern Puebla Nahuatl"}, ["nck"] = {"Na-kara"}, ["ncl"] = {"Michoacán Nahuatl"}, ["ncm"] = {"Nambo"}, ["ncn"] = {"Nauna"}, ["nco"] = {"Sibe"}, ["ncq"] = {"Northern Katang"}, ["ncr"] = {"Ncane"}, ["ncs"] = {"Nicaraguan Sign Language"}, ["nct"] = {"Chothe Naga"}, ["ncu"] = {"Chumburung"}, ["ncx"] = {"Central Puebla Nahuatl"}, ["ncz"] = {"Natchez"}, ["nda"] = {"Ndasa"}, ["ndb"] = {"Kenswei Nsei"}, ["ndc"] = {"Ndau"}, ["ndd"] = {"Nde-Nsele-Nta"}, ["ndf"] = {"Nadruvian"}, ["ndg"] = {"Ndengereko"}, ["ndh"] = {"Ndali"}, ["ndi"] = {"Samba Leko"}, ["ndj"] = {"Ndamba"}, ["ndk"] = {"Ndaka"}, ["ndl"] = {"Ndolo"}, ["ndm"] = {"Ndam"}, ["ndn"] = {"Ngundi"}, ["ndp"] = {"Ndo"}, ["ndq"] = {"Ndombe"}, ["ndr"] = {"Ndoola"}, ["nds"] = {"Low German", "Low Saxon"}, ["ndt"] = {"Ndunga"}, ["ndu"] = {"Dugun"}, ["ndv"] = {"Ndut"}, ["ndw"] = {"Ndobo"}, ["ndx"] = {"Nduga"}, ["ndy"] = {"Lutos"}, ["ndz"] = {"Ndogo"}, ["nea"] = {"Eastern Ngad'a"}, ["neb"] = {"Toura (Côte d'Ivoire)"}, ["nec"] = {"Nedebang"}, ["ned"] = {"Nde-Gbite"}, ["nee"] = {"Nêlêmwa-Nixumwak"}, ["nef"] = {"Nefamese"}, ["neg"] = {"Negidal"}, ["neh"] = {"Nyenkha"}, ["nei"] = {"Neo-Hittite"}, ["nej"] = {"Neko"}, ["nek"] = {"Neku"}, ["nem"] = {"Nemi"}, ["nen"] = {"Nengone"}, ["neo"] = {"Ná-Meo"}, ["neq"] = {"North Central Mixe"}, ["ner"] = {"Yahadian"}, ["nes"] = {"Bhoti Kinnauri"}, ["net"] = {"Nete"}, ["neu"] = {"Neo"}, ["nev"] = {"Nyaheun"}, ["new"] = {"Newari", "Nepal Bhasa"}, ["nex"] = {"Neme"}, ["ney"] = {"Neyo"}, ["nez"] = {"Nez Perce"}, ["nfa"] = {"Dhao"}, ["nfd"] = {"Ahwai"}, ["nfl"] = {"Ayiwo", "Äiwoo"}, ["nfr"] = {"Nafaanra"}, ["nfu"] = {"Mfumte"}, ["nga"] = {"Ngbaka"}, ["ngb"] = {"Northern Ngbandi"}, ["ngc"] = {"Ngombe (Democratic Republic of Congo)"}, ["ngd"] = {"Ngando (Central African Republic)"}, ["nge"] = {"Ngemba"}, ["ngf"] = {"Trans-New Guinea languages"}, ["ngg"] = {"Ngbaka Manza"}, ["ngh"] = {"Nǁng"}, ["ngi"] = {"Ngizim"}, ["ngj"] = {"Ngie"}, ["ngk"] = {"Dalabon"}, ["ngl"] = {"Lomwe"}, ["ngm"] = {"Ngatik Men's Creole"}, ["ngn"] = {"Ngwo"}, ["ngp"] = {"Ngulu"}, ["ngq"] = {"Ngurimi", "Ngoreme"}, ["ngr"] = {"Engdewu"}, ["ngs"] = {"Gvoko"}, ["ngt"] = {"Kriang", "Ngeq"}, ["ngu"] = {"Guerrero Nahuatl"}, ["ngv"] = {"Nagumi"}, ["ngw"] = {"Ngwaba"}, ["ngx"] = {"Nggwahyi"}, ["ngy"] = {"Tibea"}, ["ngz"] = {"Ngungwel"}, ["nha"] = {"Nhanda"}, ["nhb"] = {"Beng"}, ["nhc"] = {"Tabasco Nahuatl"}, ["nhd"] = {"Chiripá", "Ava Guaraní"}, ["nhe"] = {"Eastern Huasteca Nahuatl"}, ["nhf"] = {"Nhuwala"}, ["nhg"] = {"Tetelcingo Nahuatl"}, ["nhh"] = {"Nahari"}, ["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"}, ["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"}, ["nhm"] = {"Morelos Nahuatl"}, ["nhn"] = {"Central Nahuatl"}, ["nho"] = {"Takuu"}, ["nhp"] = {"Isthmus-Pajapan Nahuatl"}, ["nhq"] = {"Huaxcaleca Nahuatl"}, ["nhr"] = {"Naro"}, ["nht"] = {"Ometepec Nahuatl"}, ["nhu"] = {"Noone"}, ["nhv"] = {"Temascaltepec Nahuatl"}, ["nhw"] = {"Western Huasteca Nahuatl"}, ["nhx"] = {"Isthmus-Mecayapan Nahuatl"}, ["nhy"] = {"Northern Oaxaca Nahuatl"}, ["nhz"] = {"Santa María La Alta Nahuatl"}, ["nia"] = {"Nias"}, ["nib"] = {"Nakame"}, ["nic"] = {"Niger-Kordofanian languages"}, ["nid"] = {"Ngandi"}, ["nie"] = {"Niellim"}, ["nif"] = {"Nek"}, ["nig"] = {"Ngalakgan"}, ["nih"] = {"Nyiha (Tanzania)"}, ["nii"] = {"Nii"}, ["nij"] = {"Ngaju"}, ["nik"] = {"Southern Nicobarese"}, ["nil"] = {"Nila"}, ["nim"] = {"Nilamba"}, ["nin"] = {"Ninzo"}, ["nio"] = {"Nganasan"}, ["niq"] = {"Nandi"}, ["nir"] = {"Nimboran"}, ["nis"] = {"Nimi"}, ["nit"] = {"Southeastern Kolami"}, ["niu"] = {"Niuean"}, ["niv"] = {"Gilyak"}, ["niw"] = {"Nimo"}, ["nix"] = {"Hema"}, ["niy"] = {"Ngiti"}, ["niz"] = {"Ningil"}, ["nja"] = {"Nzanyi"}, ["njb"] = {"Nocte Naga"}, ["njd"] = {"Ndonde Hamba"}, ["njh"] = {"Lotha Naga"}, ["nji"] = {"Gudanji"}, ["njj"] = {"Njen"}, ["njl"] = {"Njalgulgule"}, ["njm"] = {"Angami Naga"}, ["njn"] = {"Liangmai Naga"}, ["njo"] = {"Ao Naga"}, ["njr"] = {"Njerep"}, ["njs"] = {"Nisa"}, ["njt"] = {"Ndyuka-Trio Pidgin"}, ["nju"] = {"Ngadjunmaya"}, ["njx"] = {"Kunyi"}, ["njy"] = {"Njyem"}, ["njz"] = {"Nyishi"}, ["nka"] = {"Nkoya"}, ["nkb"] = {"Khoibu Naga"}, ["nkc"] = {"Nkongho"}, ["nkd"] = {"Koireng"}, ["nke"] = {"Duke"}, ["nkf"] = {"Inpui Naga"}, ["nkg"] = {"Nekgini"}, ["nkh"] = {"Khezha Naga"}, ["nki"] = {"Thangal Naga"}, ["nkj"] = {"Nakai"}, ["nkk"] = {"Nokuku"}, ["nkm"] = {"Namat"}, ["nkn"] = {"Nkangala"}, ["nko"] = {"Nkonya"}, ["nkp"] = {"Niuatoputapu"}, ["nkq"] = {"Nkami"}, ["nkr"] = {"Nukuoro"}, ["nks"] = {"North Asmat"}, ["nkt"] = {"Nyika (Tanzania)"}, ["nku"] = {"Bouna Kulango"}, ["nkv"] = {"Nyika (Malawi and Zambia)"}, ["nkw"] = {"Nkutu"}, ["nkx"] = {"Nkoroo"}, ["nkz"] = {"Nkari"}, ["nla"] = {"Ngombale"}, ["nlc"] = {"Nalca"}, ["nle"] = {"East Nyala"}, ["nlg"] = {"Gela"}, ["nli"] = {"Grangali"}, ["nlj"] = {"Nyali"}, ["nlk"] = {"Ninia Yali"}, ["nll"] = {"Nihali"}, ["nlm"] = {"Mankiyali"}, ["nlo"] = {"Ngul"}, ["nlq"] = {"Lao Naga"}, ["nlu"] = {"Nchumbulu"}, ["nlv"] = {"Orizaba Nahuatl"}, ["nlw"] = {"Walangama"}, ["nlx"] = {"Nahali"}, ["nly"] = {"Nyamal"}, ["nlz"] = {"Nalögo"}, ["nma"] = {"Maram Naga"}, ["nmb"] = {"Big Nambas", "V'ënen Taut"}, ["nmc"] = {"Ngam"}, ["nmd"] = {"Ndumu"}, ["nme"] = {"Mzieme Naga"}, ["nmf"] = {"Tangkhul Naga (India)"}, ["nmg"] = {"Kwasio"}, ["nmh"] = {"Monsang Naga"}, ["nmi"] = {"Nyam"}, ["nmj"] = {"Ngombe (Central African Republic)"}, ["nmk"] = {"Namakura"}, ["nml"] = {"Ndemli"}, ["nmm"] = {"Manangba"}, ["nmn"] = {"ǃXóõ"}, ["nmo"] = {"Moyon Naga"}, ["nmp"] = {"Nimanbur"}, ["nmq"] = {"Nambya"}, ["nmr"] = {"Nimbari"}, ["nms"] = {"Letemboi"}, ["nmt"] = {"Namonuito"}, ["nmu"] = {"Northeast Maidu"}, ["nmv"] = {"Ngamini"}, ["nmw"] = {"Nimoa", "Rifao"}, ["nmx"] = {"Nama (Papua New Guinea)"}, ["nmy"] = {"Namuyi"}, ["nmz"] = {"Nawdm"}, ["nna"] = {"Nyangumarta"}, ["nnb"] = {"Nande"}, ["nnc"] = {"Nancere"}, ["nnd"] = {"West Ambae"}, ["nne"] = {"Ngandyera"}, ["nnf"] = {"Ngaing"}, ["nng"] = {"Maring Naga"}, ["nnh"] = {"Ngiemboon"}, ["nni"] = {"North Nuaulu"}, ["nnj"] = {"Nyangatom"}, ["nnk"] = {"Nankina"}, ["nnl"] = {"Northern Rengma Naga"}, ["nnm"] = {"Namia"}, ["nnn"] = {"Ngete"}, ["nnp"] = {"Wancho Naga"}, ["nnq"] = {"Ngindo"}, ["nnr"] = {"Narungga"}, ["nnt"] = {"Nanticoke"}, ["nnu"] = {"Dwang"}, ["nnv"] = {"Nugunu (Australia)"}, ["nnw"] = {"Southern Nuni"}, ["nny"] = {"Nyangga"}, ["nnz"] = {"Nda'nda'"}, ["noa"] = {"Woun Meu"}, ["noc"] = {"Nuk"}, ["nod"] = {"Northern Thai"}, ["noe"] = {"Nimadi"}, ["nof"] = {"Nomane"}, ["nog"] = {"Nogai"}, ["noh"] = {"Nomu"}, ["noi"] = {"Noiri"}, ["noj"] = {"Nonuya"}, ["nok"] = {"Nooksack"}, ["nol"] = {"Nomlaki"}, ["non"] = {"Old Norse"}, ["nop"] = {"Numanggang"}, ["noq"] = {"Ngongo"}, ["nos"] = {"Eastern Nisu"}, ["not"] = {"Nomatsiguenga"}, ["nou"] = {"Ewage-Notu"}, ["nov"] = {"Novial"}, ["now"] = {"Nyambo"}, ["noy"] = {"Noy"}, ["noz"] = {"Nayi"}, ["npa"] = {"Nar Phu"}, ["npb"] = {"Nupbikha"}, ["npg"] = {"Ponyo-Gongwang Naga"}, ["nph"] = {"Phom Naga"}, ["npi"] = {"Nepali (individual language)"}, ["npl"] = {"Southeastern Puebla Nahuatl"}, ["npn"] = {"Mondropolon"}, ["npo"] = {"Pochuri Naga"}, ["nps"] = {"Nipsan"}, ["npu"] = {"Puimei Naga"}, ["npx"] = {"Noipx"}, ["npy"] = {"Napu"}, ["nqg"] = {"Southern Nago"}, ["nqk"] = {"Kura Ede Nago"}, ["nql"] = {"Ngendelengo"}, ["nqm"] = {"Ndom"}, ["nqn"] = {"Nen"}, ["nqo"] = {"N'Ko", "N’Ko"}, ["nqq"] = {"Kyan-Karyaw Naga"}, ["nqt"] = {"Nteng"}, ["nqy"] = {"Akyaung Ari Naga"}, ["nra"] = {"Ngom"}, ["nrb"] = {"Nara"}, ["nrc"] = {"Noric"}, ["nre"] = {"Southern Rengma Naga"}, ["nrf"] = {"Jèrriais", "Guernésiais", "Sercquiais"}, ["nrg"] = {"Narango"}, ["nri"] = {"Chokri Naga"}, ["nrk"] = {"Ngarla"}, ["nrl"] = {"Ngarluma"}, ["nrm"] = {"Narom"}, ["nrn"] = {"Norn"}, ["nrp"] = {"North Picene"}, ["nrr"] = {"Norra", "Nora"}, ["nrt"] = {"Northern Kalapuya"}, ["nru"] = {"Narua"}, ["nrx"] = {"Ngurmbur"}, ["nrz"] = {"Lala"}, ["nsa"] = {"Sangtam Naga"}, ["nsb"] = {"Lower Nossob"}, ["nsc"] = {"Nshi"}, ["nsd"] = {"Southern Nisu"}, ["nse"] = {"Nsenga"}, ["nsf"] = {"Northwestern Nisu"}, ["nsg"] = {"Ngasa"}, ["nsh"] = {"Ngoshie"}, ["nsi"] = {"Nigerian Sign Language"}, ["nsk"] = {"Naskapi"}, ["nsl"] = {"Norwegian Sign Language"}, ["nsm"] = {"Sumi Naga"}, ["nsn"] = {"Nehan"}, ["nso"] = {"Pedi", "Northern Sotho", "Sepedi"}, ["nsp"] = {"Nepalese Sign Language"}, ["nsq"] = {"Northern Sierra Miwok"}, ["nsr"] = {"Maritime Sign Language"}, ["nss"] = {"Nali"}, ["nst"] = {"Tase Naga"}, ["nsu"] = {"Sierra Negra Nahuatl"}, ["nsv"] = {"Southwestern Nisu"}, ["nsw"] = {"Navut"}, ["nsx"] = {"Nsongo"}, ["nsy"] = {"Nasal"}, ["nsz"] = {"Nisenan"}, ["ntd"] = {"Northern Tidung"}, ["nte"] = {"Nathembo"}, ["ntg"] = {"Ngantangarra"}, ["nti"] = {"Natioro"}, ["ntj"] = {"Ngaanyatjarra"}, ["ntk"] = {"Ikoma-Nata-Isenye"}, ["ntm"] = {"Nateni"}, ["nto"] = {"Ntomba"}, ["ntp"] = {"Northern Tepehuan"}, ["ntr"] = {"Delo"}, ["ntu"] = {"Natügu"}, ["ntw"] = {"Nottoway"}, ["ntx"] = {"Tangkhul Naga (Myanmar)"}, ["nty"] = {"Mantsi"}, ["ntz"] = {"Natanzi"}, ["nua"] = {"Yuanga"}, ["nub"] = {"Nubian languages"}, ["nuc"] = {"Nukuini"}, ["nud"] = {"Ngala"}, ["nue"] = {"Ngundu"}, ["nuf"] = {"Nusu"}, ["nug"] = {"Nungali"}, ["nuh"] = {"Ndunda"}, ["nui"] = {"Ngumbi"}, ["nuj"] = {"Nyole"}, ["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"}, ["nul"] = {"Nusa Laut"}, ["num"] = {"Niuafo'ou"}, ["nun"] = {"Anong"}, ["nuo"] = {"Nguôn"}, ["nup"] = {"Nupe-Nupe-Tako"}, ["nuq"] = {"Nukumanu"}, ["nur"] = {"Nukuria"}, ["nus"] = {"Nuer"}, ["nut"] = {"Nung (Viet Nam)"}, ["nuu"] = {"Ngbundu"}, ["nuv"] = {"Northern Nuni"}, ["nuw"] = {"Nguluwan"}, ["nux"] = {"Mehek"}, ["nuy"] = {"Nunggubuyu"}, ["nuz"] = {"Tlamacazapa Nahuatl"}, ["nvh"] = {"Nasarian"}, ["nvm"] = {"Namiae"}, ["nvo"] = {"Nyokon"}, ["nwa"] = {"Nawathinehena"}, ["nwb"] = {"Nyabwa"}, ["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"}, ["nwe"] = {"Ngwe"}, ["nwg"] = {"Ngayawung"}, ["nwi"] = {"Southwest Tanna"}, ["nwm"] = {"Nyamusa-Molo"}, ["nwo"] = {"Nauo"}, ["nwr"] = {"Nawaru"}, ["nww"] = {"Ndwewe"}, ["nwx"] = {"Middle Newar"}, ["nwy"] = {"Nottoway-Meherrin"}, ["nxa"] = {"Nauete"}, ["nxd"] = {"Ngando (Democratic Republic of Congo)"}, ["nxe"] = {"Nage"}, ["nxg"] = {"Ngad'a"}, ["nxi"] = {"Nindi"}, ["nxk"] = {"Koki Naga"}, ["nxl"] = {"South Nuaulu"}, ["nxm"] = {"Numidian"}, ["nxn"] = {"Ngawun"}, ["nxo"] = {"Ndambomo"}, ["nxq"] = {"Naxi"}, ["nxr"] = {"Ninggerum"}, ["nxx"] = {"Nafri"}, ["nyb"] = {"Nyangbo"}, ["nyc"] = {"Nyanga-li"}, ["nyd"] = {"Nyore", "Olunyole"}, ["nye"] = {"Nyengo"}, ["nyf"] = {"Giryama", "Kigiryama"}, ["nyg"] = {"Nyindu"}, ["nyh"] = {"Nyikina"}, ["nyi"] = {"Ama (Sudan)"}, ["nyj"] = {"Nyanga"}, ["nyk"] = {"Nyaneka"}, ["nyl"] = {"Nyeu"}, ["nym"] = {"Nyamwezi"}, ["nyn"] = {"Nyankole"}, ["nyo"] = {"Nyoro"}, ["nyp"] = {"Nyang'i"}, ["nyq"] = {"Nayini"}, ["nyr"] = {"Nyiha (Malawi)"}, ["nys"] = {"Nyungar"}, ["nyt"] = {"Nyawaygi"}, ["nyu"] = {"Nyungwe"}, ["nyv"] = {"Nyulnyul"}, ["nyw"] = {"Nyaw"}, ["nyx"] = {"Nganyaywana"}, ["nyy"] = {"Nyakyusa-Ngonde"}, ["nza"] = {"Tigon Mbembe"}, ["nzb"] = {"Njebi"}, ["nzd"] = {"Nzadi"}, ["nzi"] = {"Nzima"}, ["nzk"] = {"Nzakara"}, ["nzm"] = {"Zeme Naga"}, ["nzr"] = {"Dir-Nyamzak-Mbarimi"}, ["nzs"] = {"New Zealand Sign Language"}, ["nzu"] = {"Teke-Nzikou"}, ["nzy"] = {"Nzakambay"}, ["nzz"] = {"Nanga Dama Dogon"}, ["oaa"] = {"Orok"}, ["oac"] = {"Oroch"}, ["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"}, ["oav"] = {"Old Avar"}, ["obi"] = {"Obispeño"}, ["obk"] = {"Southern Bontok"}, ["obl"] = {"Oblo"}, ["obm"] = {"Moabite"}, ["obo"] = {"Obo Manobo"}, ["obr"] = {"Old Burmese"}, ["obt"] = {"Old Breton"}, ["obu"] = {"Obulom"}, ["oca"] = {"Ocaina"}, ["och"] = {"Old Chinese"}, ["ocm"] = {"Old Cham"}, ["oco"] = {"Old Cornish"}, ["ocu"] = {"Atzingo Matlatzinca"}, ["oda"] = {"Odut"}, ["odk"] = {"Od"}, ["odt"] = {"Old Dutch"}, ["odu"] = {"Odual"}, ["ofo"] = {"Ofo"}, ["ofs"] = {"Old Frisian"}, ["ofu"] = {"Efutop"}, ["ogb"] = {"Ogbia"}, ["ogc"] = {"Ogbah"}, ["oge"] = {"Old Georgian"}, ["ogg"] = {"Ogbogolo"}, ["ogo"] = {"Khana"}, ["ogu"] = {"Ogbronuagum"}, ["oht"] = {"Old Hittite"}, ["ohu"] = {"Old Hungarian"}, ["oia"] = {"Oirata"}, ["oie"] = {"Okolie"}, ["oin"] = {"Inebu One"}, ["ojb"] = {"Northwestern Ojibwa"}, ["ojc"] = {"Central Ojibwa"}, ["ojg"] = {"Eastern Ojibwa"}, ["ojp"] = {"Old Japanese"}, ["ojs"] = {"Severn Ojibwa"}, ["ojv"] = {"Ontong Java"}, ["ojw"] = {"Western Ojibwa"}, ["oka"] = {"Okanagan"}, ["okb"] = {"Okobo"}, ["okc"] = {"Kobo"}, ["okd"] = {"Okodia"}, ["oke"] = {"Okpe (Southwestern Edo)"}, ["okg"] = {"Koko Babangk"}, ["okh"] = {"Koresh-e Rostam"}, ["oki"] = {"Okiek"}, ["okj"] = {"Oko-Juwoi"}, ["okk"] = {"Kwamtim One"}, ["okl"] = {"Old Kentish Sign Language"}, ["okm"] = {"Middle Korean (10th-16th cent.)"}, ["okn"] = {"Oki-No-Erabu"}, ["oko"] = {"Old Korean (3rd-9th cent.)"}, ["okr"] = {"Kirike"}, ["oks"] = {"Oko-Eni-Osayen"}, ["oku"] = {"Oku"}, ["okv"] = {"Orokaiva"}, ["okx"] = {"Okpe (Northwestern Edo)"}, ["okz"] = {"Old Khmer"}, ["ola"] = {"Walungge"}, ["old"] = {"Mochi"}, ["ole"] = {"Olekha"}, ["olk"] = {"Olkol"}, ["olm"] = {"Oloma"}, ["olo"] = {"Livvi"}, ["olr"] = {"Olrat"}, ["olt"] = {"Old Lithuanian"}, ["olu"] = {"Kuvale"}, ["oma"] = {"Omaha-Ponca"}, ["omb"] = {"East Ambae"}, ["omc"] = {"Mochica"}, ["omg"] = {"Omagua"}, ["omi"] = {"Omi"}, ["omk"] = {"Omok"}, ["oml"] = {"Ombo"}, ["omn"] = {"Minoan"}, ["omo"] = {"Utarmbung"}, ["omp"] = {"Old Manipuri"}, ["omq"] = {"Oto-Manguean languages"}, ["omr"] = {"Old Marathi"}, ["omt"] = {"Omotik"}, ["omu"] = {"Omurano"}, ["omv"] = {"Omotic languages"}, ["omw"] = {"South Tairora"}, ["omx"] = {"Old Mon"}, ["omy"] = {"Old Malay"}, ["ona"] = {"Ona"}, ["onb"] = {"Lingao"}, ["one"] = {"Oneida"}, ["ong"] = {"Olo"}, ["oni"] = {"Onin"}, ["onj"] = {"Onjob"}, ["onk"] = {"Kabore One"}, ["onn"] = {"Onobasulu"}, ["ono"] = {"Onondaga"}, ["onp"] = {"Sartang"}, ["onr"] = {"Northern One"}, ["ons"] = {"Ono"}, ["ont"] = {"Ontenu"}, ["onu"] = {"Unua"}, ["onw"] = {"Old Nubian"}, ["onx"] = {"Onin Based Pidgin"}, ["ood"] = {"Tohono O'odham"}, ["oog"] = {"Ong"}, ["oon"] = {"Önge"}, ["oor"] = {"Oorlams"}, ["oos"] = {"Old Ossetic"}, ["opa"] = {"Okpamheri"}, ["opk"] = {"Kopkaka"}, ["opm"] = {"Oksapmin"}, ["opo"] = {"Opao"}, ["opt"] = {"Opata"}, ["opy"] = {"Ofayé"}, ["ora"] = {"Oroha"}, ["orc"] = {"Orma"}, ["ore"] = {"Orejón"}, ["org"] = {"Oring"}, ["orh"] = {"Oroqen"}, ["orn"] = {"Orang Kanaq"}, ["oro"] = {"Orokolo"}, ["orr"] = {"Oruma"}, ["ors"] = {"Orang Seletar"}, ["ort"] = {"Adivasi Oriya"}, ["oru"] = {"Ormuri"}, ["orv"] = {"Old Russian"}, ["orw"] = {"Oro Win"}, ["orx"] = {"Oro"}, ["ory"] = {"Odia (individual language)", "Oriya (individual language)"}, ["orz"] = {"Ormu"}, ["osa"] = {"Osage"}, ["osc"] = {"Oscan"}, ["osi"] = {"Osing"}, ["osn"] = {"Old Sundanese"}, ["oso"] = {"Ososo"}, ["osp"] = {"Old Spanish"}, ["ost"] = {"Osatu"}, ["osu"] = {"Southern One"}, ["osx"] = {"Old Saxon"}, ["ota"] = {"Ottoman Turkish (1500-1928)"}, ["otb"] = {"Old Tibetan"}, ["otd"] = {"Ot Danum"}, ["ote"] = {"Mezquital Otomi"}, ["oti"] = {"Oti"}, ["otk"] = {"Old Turkish"}, ["otl"] = {"Tilapa Otomi"}, ["otm"] = {"Eastern Highland Otomi"}, ["otn"] = {"Tenango Otomi"}, ["oto"] = {"Otomian languages"}, ["otq"] = {"Querétaro Otomi"}, ["otr"] = {"Otoro"}, ["ots"] = {"Estado de México Otomi"}, ["ott"] = {"Temoaya Otomi"}, ["otu"] = {"Otuke"}, ["otw"] = {"Ottawa"}, ["otx"] = {"Texcatepec Otomi"}, ["oty"] = {"Old Tamil"}, ["otz"] = {"Ixtenco Otomi"}, ["oua"] = {"Tagargrent"}, ["oub"] = {"Glio-Oubi"}, ["oue"] = {"Oune"}, ["oui"] = {"Old Uighur"}, ["oum"] = {"Ouma"}, ["ovd"] = {"Elfdalian", "Övdalian"}, ["owi"] = {"Owiniga"}, ["owl"] = {"Old Welsh"}, ["oyb"] = {"Oy"}, ["oyd"] = {"Oyda"}, ["oym"] = {"Wayampi"}, ["oyy"] = {"Oya'oya"}, ["ozm"] = {"Koonzime"}, ["paa"] = {"Papuan languages"}, ["pab"] = {"Parecís"}, ["pac"] = {"Pacoh"}, ["pad"] = {"Paumarí"}, ["pae"] = {"Pagibete"}, ["paf"] = {"Paranawát"}, ["pag"] = {"Pangasinan"}, ["pah"] = {"Tenharim"}, ["pai"] = {"Pe"}, ["pak"] = {"Parakanã"}, ["pal"] = {"Pahlavi"}, ["pam"] = {"Pampanga", "Kapampangan"}, ["pao"] = {"Northern Paiute"}, ["pap"] = {"Papiamento"}, ["paq"] = {"Parya"}, ["par"] = {"Panamint", "Timbisha"}, ["pas"] = {"Papasena"}, ["pau"] = {"Palauan"}, ["pav"] = {"Pakaásnovos"}, ["paw"] = {"Pawnee"}, ["pax"] = {"Pankararé"}, ["pay"] = {"Pech"}, ["paz"] = {"Pankararú"}, ["pbb"] = {"Páez"}, ["pbc"] = {"Patamona"}, ["pbe"] = {"Mezontla Popoloca"}, ["pbf"] = {"Coyotepec Popoloca"}, ["pbg"] = {"Paraujano"}, ["pbh"] = {"E'ñapa Woromaipu"}, ["pbi"] = {"Parkwa"}, ["pbl"] = {"Mak (Nigeria)"}, ["pbm"] = {"Puebla Mazatec"}, ["pbn"] = {"Kpasam"}, ["pbo"] = {"Papel"}, ["pbp"] = {"Badyara"}, ["pbr"] = {"Pangwa"}, ["pbs"] = {"Central Pame"}, ["pbt"] = {"Southern Pashto"}, ["pbu"] = {"Northern Pashto"}, ["pbv"] = {"Pnar"}, ["pby"] = {"Pyu (Papua New Guinea)"}, ["pca"] = {"Santa Inés Ahuatempan Popoloca"}, ["pcb"] = {"Pear"}, ["pcc"] = {"Bouyei"}, ["pcd"] = {"Picard"}, ["pce"] = {"Ruching Palaung"}, ["pcf"] = {"Paliyan"}, ["pcg"] = {"Paniya"}, ["pch"] = {"Pardhan"}, ["pci"] = {"Duruwa"}, ["pcj"] = {"Parenga"}, ["pck"] = {"Paite Chin"}, ["pcl"] = {"Pardhi"}, ["pcm"] = {"Nigerian Pidgin"}, ["pcn"] = {"Piti"}, ["pcp"] = {"Pacahuara"}, ["pcw"] = {"Pyapun"}, ["pda"] = {"Anam"}, ["pdc"] = {"Pennsylvania German"}, ["pdi"] = {"Pa Di"}, ["pdn"] = {"Podena", "Fedan"}, ["pdo"] = {"Padoe"}, ["pdt"] = {"Plautdietsch"}, ["pdu"] = {"Kayan"}, ["pea"] = {"Peranakan Indonesian"}, ["peb"] = {"Eastern Pomo"}, ["ped"] = {"Mala (Papua New Guinea)"}, ["pee"] = {"Taje"}, ["pef"] = {"Northeastern Pomo"}, ["peg"] = {"Pengo"}, ["peh"] = {"Bonan"}, ["pei"] = {"Chichimeca-Jonaz"}, ["pej"] = {"Northern Pomo"}, ["pek"] = {"Penchal"}, ["pel"] = {"Pekal"}, ["pem"] = {"Phende"}, ["peo"] = {"Old Persian (ca. 600-400 B.C.)"}, ["pep"] = {"Kunja"}, ["peq"] = {"Southern Pomo"}, ["pes"] = {"Iranian Persian"}, ["pev"] = {"Pémono"}, ["pex"] = {"Petats"}, ["pey"] = {"Petjo"}, ["pez"] = {"Eastern Penan"}, ["pfa"] = {"Pááfang"}, ["pfe"] = {"Pere"}, ["pfl"] = {"Pfaelzisch"}, ["pga"] = {"Sudanese Creole Arabic"}, ["pgd"] = {"Gāndhārī"}, ["pgg"] = {"Pangwali"}, ["pgi"] = {"Pagi"}, ["pgk"] = {"Rerep"}, ["pgl"] = {"Primitive Irish"}, ["pgn"] = {"Paelignian"}, ["pgs"] = {"Pangseng"}, ["pgu"] = {"Pagu"}, ["pgz"] = {"Papua New Guinean Sign Language"}, ["pha"] = {"Pa-Hng"}, ["phd"] = {"Phudagi"}, ["phg"] = {"Phuong"}, ["phh"] = {"Phukha"}, ["phi"] = {"Philippine languages"}, ["phj"] = {"Pahari"}, ["phk"] = {"Phake"}, ["phl"] = {"Phalura", "Palula"}, ["phm"] = {"Phimbi"}, ["phn"] = {"Phoenician"}, ["pho"] = {"Phunoi"}, ["phq"] = {"Phana'"}, ["phr"] = {"Pahari-Potwari"}, ["pht"] = {"Phu Thai"}, ["phu"] = {"Phuan"}, ["phv"] = {"Pahlavani"}, ["phw"] = {"Phangduwali"}, ["pia"] = {"Pima Bajo"}, ["pib"] = {"Yine"}, ["pic"] = {"Pinji"}, ["pid"] = {"Piaroa"}, ["pie"] = {"Piro"}, ["pif"] = {"Pingelapese"}, ["pig"] = {"Pisabo"}, ["pih"] = {"Pitcairn-Norfolk"}, ["pij"] = {"Pijao"}, ["pil"] = {"Yom"}, ["pim"] = {"Powhatan"}, ["pin"] = {"Piame"}, ["pio"] = {"Piapoco"}, ["pip"] = {"Pero"}, ["pir"] = {"Piratapuyo"}, ["pis"] = {"Pijin"}, ["pit"] = {"Pitta Pitta"}, ["piu"] = {"Pintupi-Luritja"}, ["piv"] = {"Pileni", "Vaeakau-Taumako"}, ["piw"] = {"Pimbwe"}, ["pix"] = {"Piu"}, ["piy"] = {"Piya-Kwonci"}, ["piz"] = {"Pije"}, ["pjt"] = {"Pitjantjatjara"}, ["pka"] = {"Ardhamāgadhī Prākrit"}, ["pkb"] = {"Pokomo", "Kipfokomo"}, ["pkc"] = {"Paekche"}, ["pkg"] = {"Pak-Tong"}, ["pkh"] = {"Pankhu"}, ["pkn"] = {"Pakanha"}, ["pko"] = {"Pökoot"}, ["pkp"] = {"Pukapuka"}, ["pkr"] = {"Attapady Kurumba"}, ["pks"] = {"Pakistan Sign Language"}, ["pkt"] = {"Maleng"}, ["pku"] = {"Paku"}, ["pla"] = {"Miani"}, ["plb"] = {"Polonombauk"}, ["plc"] = {"Central Palawano"}, ["pld"] = {"Polari"}, ["ple"] = {"Palu'e"}, ["plf"] = {"Central Malayo-Polynesian languages"}, ["plg"] = {"Pilagá"}, ["plh"] = {"Paulohi"}, ["plk"] = {"Kohistani Shina"}, ["pll"] = {"Shwe Palaung"}, ["pln"] = {"Palenquero"}, ["plo"] = {"Oluta Popoluca"}, ["plq"] = {"Palaic"}, ["plr"] = {"Palaka Senoufo"}, ["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"}, ["plt"] = {"Plateau Malagasy"}, ["plu"] = {"Palikúr"}, ["plv"] = {"Southwest Palawano"}, ["plw"] = {"Brooke's Point Palawano"}, ["ply"] = {"Bolyu"}, ["plz"] = {"Paluan"}, ["pma"] = {"Paama"}, ["pmb"] = {"Pambia"}, ["pmd"] = {"Pallanganmiddang"}, ["pme"] = {"Pwaamei"}, ["pmf"] = {"Pamona"}, ["pmh"] = {"Māhārāṣṭri Prākrit"}, ["pmi"] = {"Northern Pumi"}, ["pmj"] = {"Southern Pumi"}, ["pml"] = {"Lingua Franca"}, ["pmm"] = {"Pomo"}, ["pmn"] = {"Pam"}, ["pmo"] = {"Pom"}, ["pmq"] = {"Northern Pame"}, ["pmr"] = {"Paynamar"}, ["pms"] = {"Piemontese"}, ["pmt"] = {"Tuamotuan"}, ["pmw"] = {"Plains Miwok"}, ["pmx"] = {"Poumei Naga"}, ["pmy"] = {"Papuan Malay"}, ["pmz"] = {"Southern Pame"}, ["pna"] = {"Punan Bah-Biau"}, ["pnb"] = {"Western Panjabi"}, ["pnc"] = {"Pannei"}, ["pnd"] = {"Mpinda"}, ["pne"] = {"Western Penan"}, ["png"] = {"Pangu", "Pongu"}, ["pnh"] = {"Penrhyn"}, ["pni"] = {"Aoheng"}, ["pnj"] = {"Pinjarup"}, ["pnk"] = {"Paunaka"}, ["pnl"] = {"Paleni"}, ["pnm"] = {"Punan Batu 1"}, ["pnn"] = {"Pinai-Hagahai"}, ["pno"] = {"Panobo"}, ["pnp"] = {"Pancana"}, ["pnq"] = {"Pana (Burkina Faso)"}, ["pnr"] = {"Panim"}, ["pns"] = {"Ponosakan"}, ["pnt"] = {"Pontic"}, ["pnu"] = {"Jiongnai Bunu"}, ["pnv"] = {"Pinigura"}, ["pnw"] = {"Banyjima", "Panytyima"}, ["pnx"] = {"Phong-Kniang"}, ["pny"] = {"Pinyin"}, ["pnz"] = {"Pana (Central African Republic)"}, ["poc"] = {"Poqomam"}, ["poe"] = {"San Juan Atzingo Popoloca"}, ["pof"] = {"Poke"}, ["pog"] = {"Potiguára"}, ["poh"] = {"Poqomchi'"}, ["poi"] = {"Highland Popoluca"}, ["pok"] = {"Pokangá"}, ["pom"] = {"Southeastern Pomo"}, ["pon"] = {"Pohnpeian"}, ["poo"] = {"Central Pomo"}, ["pop"] = {"Pwapwâ"}, ["poq"] = {"Texistepec Popoluca"}, ["pos"] = {"Sayula Popoluca"}, ["pot"] = {"Potawatomi"}, ["pov"] = {"Upper Guinea Crioulo"}, ["pow"] = {"San Felipe Otlaltepec Popoloca"}, ["pox"] = {"Polabian"}, ["poy"] = {"Pogolo"}, ["poz"] = {"Malayo-Polynesian languages"}, ["ppe"] = {"Papi"}, ["ppi"] = {"Paipai"}, ["ppk"] = {"Uma"}, ["ppl"] = {"Pipil", "Nicarao"}, ["ppm"] = {"Papuma"}, ["ppn"] = {"Papapana"}, ["ppo"] = {"Folopa"}, ["ppp"] = {"Pelende"}, ["ppq"] = {"Pei"}, ["pps"] = {"San Luís Temalacayuca Popoloca"}, ["ppt"] = {"Pare"}, ["ppu"] = {"Papora"}, ["pqa"] = {"Pa'a"}, ["pqe"] = {"Eastern Malayo-Polynesian languages"}, ["pqm"] = {"Malecite-Passamaquoddy"}, ["pqw"] = {"Western Malayo-Polynesian languages"}, ["pra"] = {"Prakrit languages"}, ["prc"] = {"Parachi"}, ["prd"] = {"Parsi-Dari"}, ["pre"] = {"Principense"}, ["prf"] = {"Paranan"}, ["prg"] = {"Prussian"}, ["prh"] = {"Porohanon"}, ["pri"] = {"Paicî"}, ["prk"] = {"Parauk"}, ["prl"] = {"Peruvian Sign Language"}, ["prm"] = {"Kibiri"}, ["prn"] = {"Prasuni"}, ["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"}, ["prq"] = {"Ashéninka Perené"}, ["prr"] = {"Puri"}, ["prs"] = {"Dari", "Afghan Persian"}, ["prt"] = {"Phai"}, ["pru"] = {"Puragi"}, ["prw"] = {"Parawen"}, ["prx"] = {"Purik"}, ["prz"] = {"Providencia Sign Language"}, ["psa"] = {"Asue Awyu"}, ["psc"] = {"Iranian Sign Language", "Persian Sign Language"}, ["psd"] = {"Plains Indian Sign Language"}, ["pse"] = {"Central Malay"}, ["psg"] = {"Penang Sign Language"}, ["psh"] = {"Southwest Pashai", "Southwest Pashayi"}, ["psi"] = {"Southeast Pashai", "Southeast Pashayi"}, ["psl"] = {"Puerto Rican Sign Language"}, ["psm"] = {"Pauserna"}, ["psn"] = {"Panasuan"}, ["pso"] = {"Polish Sign Language"}, ["psp"] = {"Philippine Sign Language"}, ["psq"] = {"Pasi"}, ["psr"] = {"Portuguese Sign Language"}, ["pss"] = {"Kaulong"}, ["pst"] = {"Central Pashto"}, ["psu"] = {"Sauraseni Prākrit"}, ["psw"] = {"Port Sandwich"}, ["psy"] = {"Piscataway"}, ["pta"] = {"Pai Tavytera"}, ["pth"] = {"Pataxó Hã-Ha-Hãe"}, ["pti"] = {"Pindiini", "Wangkatha"}, ["ptn"] = {"Patani"}, ["pto"] = {"Zo'é"}, ["ptp"] = {"Patep"}, ["ptq"] = {"Pattapu"}, ["ptr"] = {"Piamatsina"}, ["ptt"] = {"Enrekang"}, ["ptu"] = {"Bambam"}, ["ptv"] = {"Port Vato"}, ["ptw"] = {"Pentlatch"}, ["pty"] = {"Pathiya"}, ["pua"] = {"Western Highland Purepecha"}, ["pub"] = {"Purum"}, ["puc"] = {"Punan Merap"}, ["pud"] = {"Punan Aput"}, ["pue"] = {"Puelche"}, ["puf"] = {"Punan Merah"}, ["pug"] = {"Phuie"}, ["pui"] = {"Puinave"}, ["puj"] = {"Punan Tubu"}, ["pum"] = {"Puma"}, ["puo"] = {"Puoc"}, ["pup"] = {"Pulabu"}, ["puq"] = {"Puquina"}, ["pur"] = {"Puruborá"}, ["put"] = {"Putoh"}, ["puu"] = {"Punu"}, ["puw"] = {"Puluwatese"}, ["pux"] = {"Puare"}, ["puy"] = {"Purisimeño"}, ["pwa"] = {"Pawaia"}, ["pwb"] = {"Panawa"}, ["pwg"] = {"Gapapaiwa"}, ["pwi"] = {"Patwin"}, ["pwm"] = {"Molbog"}, ["pwn"] = {"Paiwan"}, ["pwo"] = {"Pwo Western Karen"}, ["pwr"] = {"Powari"}, ["pww"] = {"Pwo Northern Karen"}, ["pxm"] = {"Quetzaltepec Mixe"}, ["pye"] = {"Pye Krumen"}, ["pym"] = {"Fyam"}, ["pyn"] = {"Poyanáwa"}, ["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"}, ["pyu"] = {"Puyuma"}, ["pyx"] = {"Pyu (Myanmar)"}, ["pyy"] = {"Pyen"}, ["pze"] = {"Pesse"}, ["pzh"] = {"Pazeh"}, ["pzn"] = {"Jejara Naga", "Para Naga"}, ["qua"] = {"Quapaw"}, ["qub"] = {"Huallaga Huánuco Quechua"}, ["quc"] = {"K'iche'", "Quiché"}, ["qud"] = {"Calderón Highland Quichua"}, ["quf"] = {"Lambayeque Quechua"}, ["qug"] = {"Chimborazo Highland Quichua"}, ["quh"] = {"South Bolivian Quechua"}, ["qui"] = {"Quileute"}, ["quk"] = {"Chachapoyas Quechua"}, ["qul"] = {"North Bolivian Quechua"}, ["qum"] = {"Sipacapense"}, ["qun"] = {"Quinault"}, ["qup"] = {"Southern Pastaza Quechua"}, ["quq"] = {"Quinqui"}, ["qur"] = {"Yanahuanca Pasco Quechua"}, ["qus"] = {"Santiago del Estero Quichua"}, ["quv"] = {"Sacapulteco"}, ["quw"] = {"Tena Lowland Quichua"}, ["qux"] = {"Yauyos Quechua"}, ["quy"] = {"Ayacucho Quechua"}, ["quz"] = {"Cusco Quechua"}, ["qva"] = {"Ambo-Pasco Quechua"}, ["qvc"] = {"Cajamarca Quechua"}, ["qve"] = {"Eastern Apurímac Quechua"}, ["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"}, ["qvi"] = {"Imbabura Highland Quichua"}, ["qvj"] = {"Loja Highland Quichua"}, ["qvl"] = {"Cajatambo North Lima Quechua"}, ["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"}, ["qvn"] = {"North Junín Quechua"}, ["qvo"] = {"Napo Lowland Quechua"}, ["qvp"] = {"Pacaraos Quechua"}, ["qvs"] = {"San Martín Quechua"}, ["qvw"] = {"Huaylla Wanca Quechua"}, ["qvy"] = {"Queyu"}, ["qvz"] = {"Northern Pastaza Quichua"}, ["qwa"] = {"Corongo Ancash Quechua"}, ["qwc"] = {"Classical Quechua"}, ["qwe"] = {"Quechuan (family)"}, ["qwh"] = {"Huaylas Ancash Quechua"}, ["qwm"] = {"Kuman (Russia)"}, ["qws"] = {"Sihuas Ancash Quechua"}, ["qwt"] = {"Kwalhioqua-Tlatskanai"}, ["qxa"] = {"Chiquián Ancash Quechua"}, ["qxc"] = {"Chincha Quechua"}, ["qxh"] = {"Panao Huánuco Quechua"}, ["qxl"] = {"Salasaca Highland Quichua"}, ["qxn"] = {"Northern Conchucos Ancash Quechua"}, ["qxo"] = {"Southern Conchucos Ancash Quechua"}, ["qxp"] = {"Puno Quechua"}, ["qxq"] = {"Qashqa'i"}, ["qxr"] = {"Cañar Highland Quichua"}, ["qxs"] = {"Southern Qiang"}, ["qxt"] = {"Santa Ana de Tusi Pasco Quechua"}, ["qxu"] = {"Arequipa-La Unión Quechua"}, ["qxw"] = {"Jauja Wanca Quechua"}, ["qya"] = {"Quenya"}, ["qyp"] = {"Quiripi"}, ["raa"] = {"Dungmali"}, ["rab"] = {"Camling"}, ["rac"] = {"Rasawa"}, ["rad"] = {"Rade"}, ["raf"] = {"Western Meohang"}, ["rag"] = {"Logooli", "Lulogooli"}, ["rah"] = {"Rabha"}, ["rai"] = {"Ramoaaina"}, ["raj"] = {"Rajasthani"}, ["rak"] = {"Tulu-Bohuai"}, ["ral"] = {"Ralte"}, ["ram"] = {"Canela"}, ["ran"] = {"Riantana"}, ["rao"] = {"Rao"}, ["rap"] = {"Rapanui"}, ["raq"] = {"Saam"}, ["rar"] = {"Rarotongan", "Cook Islands Maori"}, ["ras"] = {"Tegali"}, ["rat"] = {"Razajerdi"}, ["rau"] = {"Raute"}, ["rav"] = {"Sampang"}, ["raw"] = {"Rawang"}, ["rax"] = {"Rang"}, ["ray"] = {"Rapa"}, ["raz"] = {"Rahambuu"}, ["rbb"] = {"Rumai Palaung"}, ["rbk"] = {"Northern Bontok"}, ["rbl"] = {"Miraya Bikol"}, ["rbp"] = {"Barababaraba"}, ["rcf"] = {"Réunion Creole French"}, ["rdb"] = {"Rudbari"}, ["rea"] = {"Rerau"}, ["reb"] = {"Rembong"}, ["ree"] = {"Rejang Kayan"}, ["reg"] = {"Kara (Tanzania)"}, ["rei"] = {"Reli"}, ["rej"] = {"Rejang"}, ["rel"] = {"Rendille"}, ["rem"] = {"Remo"}, ["ren"] = {"Rengao"}, ["rer"] = {"Rer Bare"}, ["res"] = {"Reshe"}, ["ret"] = {"Retta"}, ["rey"] = {"Reyesano"}, ["rga"] = {"Roria"}, ["rge"] = {"Romano-Greek"}, ["rgk"] = {"Rangkas"}, ["rgn"] = {"Romagnol"}, ["rgr"] = {"Resígaro"}, ["rgs"] = {"Southern Roglai"}, ["rgu"] = {"Ringgou"}, ["rhg"] = {"Rohingya"}, ["rhp"] = {"Yahang"}, ["ria"] = {"Riang (India)"}, ["rib"] = {"Bribri Sign Language"}, ["rif"] = {"Tarifit"}, ["ril"] = {"Riang Lang", "Riang (Myanmar)"}, ["rim"] = {"Nyaturu"}, ["rin"] = {"Nungu"}, ["rir"] = {"Ribun"}, ["rit"] = {"Ritharrngu"}, ["riu"] = {"Riung"}, ["rjg"] = {"Rajong"}, ["rji"] = {"Raji"}, ["rjs"] = {"Rajbanshi"}, ["rka"] = {"Kraol"}, ["rkb"] = {"Rikbaktsa"}, ["rkh"] = {"Rakahanga-Manihiki"}, ["rki"] = {"Rakhine"}, ["rkm"] = {"Marka"}, ["rkt"] = {"Rangpuri", "Kamta"}, ["rkw"] = {"Arakwal"}, ["rma"] = {"Rama"}, ["rmb"] = {"Rembarrnga"}, ["rmc"] = {"Carpathian Romani"}, ["rmd"] = {"Traveller Danish"}, ["rme"] = {"Angloromani"}, ["rmf"] = {"Kalo Finnish Romani"}, ["rmg"] = {"Traveller Norwegian"}, ["rmh"] = {"Murkim"}, ["rmi"] = {"Lomavren"}, ["rmk"] = {"Romkun"}, ["rml"] = {"Baltic Romani"}, ["rmm"] = {"Roma"}, ["rmn"] = {"Balkan Romani"}, ["rmo"] = {"Sinte Romani"}, ["rmp"] = {"Rempi"}, ["rmq"] = {"Caló"}, ["rms"] = {"Romanian Sign Language"}, ["rmt"] = {"Domari"}, ["rmu"] = {"Tavringer Romani"}, ["rmv"] = {"Romanova"}, ["rmw"] = {"Welsh Romani"}, ["rmx"] = {"Romam"}, ["rmy"] = {"Vlax Romani"}, ["rmz"] = {"Marma"}, ["rnb"] = {"Brunca Sign Language"}, ["rnd"] = {"Ruund"}, ["rng"] = {"Ronga"}, ["rnl"] = {"Ranglong"}, ["rnn"] = {"Roon"}, ["rnp"] = {"Rongpo"}, ["rnr"] = {"Nari Nari"}, ["rnw"] = {"Rungwa"}, ["roa"] = {"Romance languages"}, ["rob"] = {"Tae'"}, ["roc"] = {"Cacgia Roglai"}, ["rod"] = {"Rogo"}, ["roe"] = {"Ronji"}, ["rof"] = {"Rombo"}, ["rog"] = {"Northern Roglai"}, ["rol"] = {"Romblomanon"}, ["rom"] = {"Romany"}, ["roo"] = {"Rotokas"}, ["rop"] = {"Kriol"}, ["ror"] = {"Rongga"}, ["rou"] = {"Runga"}, ["row"] = {"Dela-Oenale"}, ["rpn"] = {"Repanbitip"}, ["rpt"] = {"Rapting"}, ["rri"] = {"Ririo"}, ["rro"] = {"Waima"}, ["rrt"] = {"Arritinngithigh"}, ["rsb"] = {"Romano-Serbian"}, ["rsk"] = {"Ruthenian", "Rusnak"}, ["rsl"] = {"Russian Sign Language"}, ["rsm"] = {"Miriwoong Sign Language"}, ["rsn"] = {"Rwandan Sign Language"}, ["rsw"] = {"Rishiwa"}, ["rtc"] = {"Rungtu Chin"}, ["rth"] = {"Ratahan"}, ["rtm"] = {"Rotuman"}, ["rts"] = {"Yurats"}, ["rtw"] = {"Rathawi"}, ["rub"] = {"Gungu"}, ["ruc"] = {"Ruuli"}, ["rue"] = {"Rusyn"}, ["ruf"] = {"Luguru"}, ["rug"] = {"Roviana"}, ["ruh"] = {"Ruga"}, ["rui"] = {"Rufiji"}, ["ruk"] = {"Che"}, ["ruo"] = {"Istro Romanian"}, ["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"}, ["ruq"] = {"Megleno Romanian"}, ["rut"] = {"Rutul"}, ["ruu"] = {"Lanas Lobu"}, ["ruy"] = {"Mala (Nigeria)"}, ["ruz"] = {"Ruma"}, ["rwa"] = {"Rawo"}, ["rwk"] = {"Rwa"}, ["rwl"] = {"Ruwila"}, ["rwm"] = {"Amba (Uganda)"}, ["rwo"] = {"Rawa"}, ["rwr"] = {"Marwari (India)"}, ["rxd"] = {"Ngardi"}, ["rxw"] = {"Karuwali", "Garuwali"}, ["ryn"] = {"Northern Amami-Oshima"}, ["rys"] = {"Yaeyama"}, ["ryu"] = {"Central Okinawan"}, ["rzh"] = {"Rāziḥī"}, ["saa"] = {"Saba"}, ["sab"] = {"Buglere"}, ["sac"] = {"Meskwaki"}, ["sad"] = {"Sandawe"}, ["sae"] = {"Sabanê"}, ["saf"] = {"Safaliba"}, ["sah"] = {"Yakut"}, ["sai"] = {"South American Indian languages"}, ["saj"] = {"Sahu"}, ["sak"] = {"Sake"}, ["sal"] = {"Salishan languages"}, ["sam"] = {"Samaritan Aramaic"}, ["sao"] = {"Sause"}, ["saq"] = {"Samburu"}, ["sar"] = {"Saraveca"}, ["sas"] = {"Sasak"}, ["sat"] = {"Santali"}, ["sau"] = {"Saleman"}, ["sav"] = {"Saafi-Saafi"}, ["saw"] = {"Sawi"}, ["sax"] = {"Sa"}, ["say"] = {"Saya"}, ["saz"] = {"Saurashtra"}, ["sba"] = {"Ngambay"}, ["sbb"] = {"Simbo"}, ["sbc"] = {"Kele (Papua New Guinea)"}, ["sbd"] = {"Southern Samo"}, ["sbe"] = {"Saliba"}, ["sbf"] = {"Chabu", "Shabo"}, ["sbg"] = {"Seget"}, ["sbh"] = {"Sori-Harengan"}, ["sbi"] = {"Seti"}, ["sbj"] = {"Surbakhal"}, ["sbk"] = {"Safwa"}, ["sbl"] = {"Botolan Sambal"}, ["sbm"] = {"Sagala"}, ["sbn"] = {"Sindhi Bhil"}, ["sbo"] = {"Sabüm"}, ["sbp"] = {"Sangu (Tanzania)"}, ["sbq"] = {"Sileibi"}, ["sbr"] = {"Sembakung Murut"}, ["sbs"] = {"Subiya"}, ["sbt"] = {"Kimki"}, ["sbu"] = {"Stod Bhoti"}, ["sbv"] = {"Sabine"}, ["sbw"] = {"Simba"}, ["sbx"] = {"Seberuang"}, ["sby"] = {"Soli"}, ["sbz"] = {"Sara Kaba"}, ["scb"] = {"Chut"}, ["sce"] = {"Dongxiang"}, ["scf"] = {"San Miguel Creole French"}, ["scg"] = {"Sanggau"}, ["sch"] = {"Sakachep"}, ["sci"] = {"Sri Lankan Creole Malay"}, ["sck"] = {"Sadri"}, ["scl"] = {"Shina"}, ["scn"] = {"Sicilian"}, ["sco"] = {"Scots"}, ["scp"] = {"Hyolmo", "Helambu Sherpa"}, ["scq"] = {"Sa'och"}, ["scs"] = {"North Slavey"}, ["sct"] = {"Southern Katang"}, ["scu"] = {"Shumcho"}, ["scv"] = {"Sheni"}, ["scw"] = {"Sha"}, ["scx"] = {"Sicel"}, ["sda"] = {"Toraja-Sa'dan"}, ["sdb"] = {"Shabak"}, ["sdc"] = {"Sassarese Sardinian"}, ["sde"] = {"Surubu"}, ["sdf"] = {"Sarli"}, ["sdg"] = {"Savi"}, ["sdh"] = {"Southern Kurdish"}, ["sdj"] = {"Suundi"}, ["sdk"] = {"Sos Kundi"}, ["sdl"] = {"Saudi Arabian Sign Language"}, ["sdn"] = {"Gallurese Sardinian"}, ["sdo"] = {"Bukar-Sadung Bidayuh"}, ["sdp"] = {"Sherdukpen"}, ["sdq"] = {"Semandang"}, ["sdr"] = {"Oraon Sadri"}, ["sds"] = {"Sened"}, ["sdt"] = {"Shuadit"}, ["sdu"] = {"Sarudu"}, ["sdv"] = {"Eastern Sudanic languages"}, ["sdx"] = {"Sibu Melanau"}, ["sdz"] = {"Sallands"}, ["sea"] = {"Semai"}, ["seb"] = {"Shempire Senoufo"}, ["sec"] = {"Sechelt"}, ["sed"] = {"Sedang"}, ["see"] = {"Seneca"}, ["sef"] = {"Cebaara Senoufo"}, ["seg"] = {"Segeju"}, ["seh"] = {"Sena"}, ["sei"] = {"Seri"}, ["sej"] = {"Sene"}, ["sek"] = {"Sekani"}, ["sel"] = {"Selkup"}, ["sem"] = {"Semitic languages"}, ["sen"] = {"Nanerigé Sénoufo"}, ["seo"] = {"Suarmin"}, ["sep"] = {"Sìcìté Sénoufo"}, ["seq"] = {"Senara Sénoufo"}, ["ser"] = {"Serrano"}, ["ses"] = {"Koyraboro Senni Songhai"}, ["set"] = {"Sentani"}, ["seu"] = {"Serui-Laut"}, ["sev"] = {"Nyarafolo Senoufo"}, ["sew"] = {"Sewa Bay"}, ["sey"] = {"Secoya"}, ["sez"] = {"Senthang Chin"}, ["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"}, ["sfe"] = {"Eastern Subanen"}, ["sfm"] = {"Small Flowery Miao"}, ["sfs"] = {"South African Sign Language"}, ["sfw"] = {"Sehwi"}, ["sga"] = {"Old Irish (to 900)"}, ["sgb"] = {"Mag-antsi Ayta"}, ["sgc"] = {"Kipsigis"}, ["sgd"] = {"Surigaonon"}, ["sge"] = {"Segai"}, ["sgg"] = {"Swiss-German Sign Language"}, ["sgh"] = {"Shughni"}, ["sgi"] = {"Suga"}, ["sgj"] = {"Surgujia"}, ["sgk"] = {"Sangkong"}, ["sgm"] = {"Singa"}, ["sgn"] = {"Sign languages"}, ["sgp"] = {"Singpho"}, ["sgr"] = {"Sangisari"}, ["sgs"] = {"Samogitian"}, ["sgt"] = {"Brokpake"}, ["sgu"] = {"Salas"}, ["sgw"] = {"Sebat Bet Gurage"}, ["sgx"] = {"Sierra Leone Sign Language"}, ["sgy"] = {"Sanglechi"}, ["sgz"] = {"Sursurunga"}, ["sha"] = {"Shall-Zwall"}, ["shb"] = {"Ninam"}, ["shc"] = {"Sonde"}, ["shd"] = {"Kundal Shahi"}, ["she"] = {"Sheko"}, ["shg"] = {"Shua"}, ["shh"] = {"Shoshoni"}, ["shi"] = {"Tachelhit"}, ["shj"] = {"Shatt"}, ["shk"] = {"Shilluk"}, ["shl"] = {"Shendu"}, ["shm"] = {"Shahrudi"}, ["shn"] = {"Shan"}, ["sho"] = {"Shanga"}, ["shp"] = {"Shipibo-Conibo"}, ["shq"] = {"Sala"}, ["shr"] = {"Shi"}, ["shs"] = {"Shuswap"}, ["sht"] = {"Shasta"}, ["shu"] = {"Chadian Arabic"}, ["shv"] = {"Shehri"}, ["shw"] = {"Shwai"}, ["shx"] = {"She"}, ["shy"] = {"Tachawit"}, ["shz"] = {"Syenara Senoufo"}, ["sia"] = {"Akkala Sami"}, ["sib"] = {"Sebop"}, ["sid"] = {"Sidamo"}, ["sie"] = {"Simaa"}, ["sif"] = {"Siamou"}, ["sig"] = {"Paasaal"}, ["sih"] = {"Zire", "Sîshëë"}, ["sii"] = {"Shom Peng"}, ["sij"] = {"Numbami"}, ["sik"] = {"Sikiana"}, ["sil"] = {"Tumulung Sisaala"}, ["sim"] = {"Mende (Papua New Guinea)"}, ["sio"] = {"Siouan languages"}, ["sip"] = {"Sikkimese"}, ["siq"] = {"Sonia"}, ["sir"] = {"Siri"}, ["sis"] = {"Siuslaw"}, ["sit"] = {"Sino-Tibetan languages"}, ["siu"] = {"Sinagen"}, ["siv"] = {"Sumariup"}, ["siw"] = {"Siwai"}, ["six"] = {"Sumau"}, ["siy"] = {"Sivandi"}, ["siz"] = {"Siwi"}, ["sja"] = {"Epena"}, ["sjb"] = {"Sajau Basap"}, ["sjd"] = {"Kildin Sami"}, ["sje"] = {"Pite Sami"}, ["sjg"] = {"Assangori"}, ["sjk"] = {"Kemi Sami"}, ["sjl"] = {"Sajalong", "Miji"}, ["sjm"] = {"Mapun"}, ["sjn"] = {"Sindarin"}, ["sjo"] = {"Xibe"}, ["sjp"] = {"Surjapuri"}, ["sjr"] = {"Siar-Lak"}, ["sjs"] = {"Senhaja De Srair"}, ["sjt"] = {"Ter Sami"}, ["sju"] = {"Ume Sami"}, ["sjw"] = {"Shawnee"}, ["ska"] = {"Skagit"}, ["skb"] = {"Saek"}, ["skc"] = {"Ma Manda"}, ["skd"] = {"Southern Sierra Miwok"}, ["ske"] = {"Seke (Vanuatu)"}, ["skf"] = {"Sakirabiá"}, ["skg"] = {"Sakalava Malagasy"}, ["skh"] = {"Sikule"}, ["ski"] = {"Sika"}, ["skj"] = {"Seke (Nepal)"}, ["skm"] = {"Kutong"}, ["skn"] = {"Kolibugan Subanon"}, ["sko"] = {"Seko Tengah"}, ["skp"] = {"Sekapan"}, ["skq"] = {"Sininkere"}, ["skr"] = {"Saraiki", "Seraiki"}, ["sks"] = {"Maia"}, ["skt"] = {"Sakata"}, ["sku"] = {"Sakao"}, ["skv"] = {"Skou"}, ["skw"] = {"Skepi Creole Dutch"}, ["skx"] = {"Seko Padang"}, ["sky"] = {"Sikaiana"}, ["skz"] = {"Sekar"}, ["sla"] = {"Slavic languages"}, ["slc"] = {"Sáliba"}, ["sld"] = {"Sissala"}, ["sle"] = {"Sholaga"}, ["slf"] = {"Swiss-Italian Sign Language"}, ["slg"] = {"Selungai Murut"}, ["slh"] = {"Southern Puget Sound Salish"}, ["sli"] = {"Lower Silesian"}, ["slj"] = {"Salumá"}, ["sll"] = {"Salt-Yui"}, ["slm"] = {"Pangutaran Sama"}, ["sln"] = {"Salinan"}, ["slp"] = {"Lamaholot"}, ["slr"] = {"Salar"}, ["sls"] = {"Singapore Sign Language"}, ["slt"] = {"Sila"}, ["slu"] = {"Selaru"}, ["slw"] = {"Sialum"}, ["slx"] = {"Salampasu"}, ["sly"] = {"Selayar"}, ["slz"] = {"Ma'ya"}, ["sma"] = {"Southern Sami"}, ["smb"] = {"Simbari"}, ["smc"] = {"Som"}, ["smf"] = {"Auwe"}, ["smg"] = {"Simbali"}, ["smh"] = {"Samei"}, ["smi"] = {"Sami languages"}, ["smj"] = {"Lule Sami"}, ["smk"] = {"Bolinao"}, ["sml"] = {"Central Sama"}, ["smm"] = {"Musasa"}, ["smn"] = {"Inari Sami"}, ["smp"] = {"Samaritan"}, ["smq"] = {"Samo"}, ["smr"] = {"Simeulue"}, ["sms"] = {"Skolt Sami"}, ["smt"] = {"Simte"}, ["smu"] = {"Somray"}, ["smv"] = {"Samvedi"}, ["smw"] = {"Sumbawa"}, ["smx"] = {"Samba"}, ["smy"] = {"Semnani"}, ["smz"] = {"Simeku"}, ["snc"] = {"Sinaugoro"}, ["sne"] = {"Bau Bidayuh"}, ["snf"] = {"Noon"}, ["sng"] = {"Sanga (Democratic Republic of Congo)"}, ["sni"] = {"Sensi"}, ["snj"] = {"Riverain Sango"}, ["snk"] = {"Soninke"}, ["snl"] = {"Sangil"}, ["snm"] = {"Southern Ma'di"}, ["snn"] = {"Siona"}, ["sno"] = {"Snohomish"}, ["snp"] = {"Siane"}, ["snq"] = {"Sangu (Gabon)"}, ["snr"] = {"Sihan"}, ["sns"] = {"South West Bay", "Nahavaq"}, ["snu"] = {"Senggi", "Viid"}, ["snv"] = {"Sa'ban"}, ["snw"] = {"Selee"}, ["snx"] = {"Sam"}, ["sny"] = {"Saniyo-Hiyewe"}, ["snz"] = {"Kou"}, ["soa"] = {"Thai Song"}, ["sob"] = {"Sobei"}, ["soc"] = {"So (Democratic Republic of Congo)"}, ["sod"] = {"Songoora"}, ["soe"] = {"Songomeno"}, ["sog"] = {"Sogdian"}, ["soh"] = {"Aka"}, ["soi"] = {"Sonha"}, ["soj"] = {"Soi"}, ["sok"] = {"Sokoro"}, ["sol"] = {"Solos"}, ["son"] = {"Songhai languages"}, ["soo"] = {"Songo"}, ["sop"] = {"Songe"}, ["soq"] = {"Kanasi"}, ["sor"] = {"Somrai"}, ["sos"] = {"Seeku"}, ["sou"] = {"Southern Thai"}, ["sov"] = {"Sonsorol"}, ["sow"] = {"Sowanda"}, ["sox"] = {"Swo"}, ["soy"] = {"Miyobe"}, ["soz"] = {"Temi"}, ["spb"] = {"Sepa (Indonesia)"}, ["spc"] = {"Sapé"}, ["spd"] = {"Saep"}, ["spe"] = {"Sepa (Papua New Guinea)"}, ["spg"] = {"Sian"}, ["spi"] = {"Saponi"}, ["spk"] = {"Sengo"}, ["spl"] = {"Selepet"}, ["spm"] = {"Akukem"}, ["spn"] = {"Sanapaná"}, ["spo"] = {"Spokane"}, ["spp"] = {"Supyire Senoufo"}, ["spq"] = {"Loreto-Ucayali Spanish"}, ["spr"] = {"Saparua"}, ["sps"] = {"Saposa"}, ["spt"] = {"Spiti Bhoti"}, ["spu"] = {"Sapuan"}, ["spv"] = {"Sambalpuri", "Kosli"}, ["spx"] = {"South Picene"}, ["spy"] = {"Sabaot"}, ["sqa"] = {"Shama-Sambuga"}, ["sqh"] = {"Shau"}, ["sqj"] = {"Albanian languages"}, ["sqk"] = {"Albanian Sign Language"}, ["sqm"] = {"Suma"}, ["sqn"] = {"Susquehannock"}, ["sqo"] = {"Sorkhei"}, ["sqq"] = {"Sou"}, ["sqr"] = {"Siculo Arabic"}, ["sqs"] = {"Sri Lankan Sign Language"}, ["sqt"] = {"Soqotri"}, ["squ"] = {"Squamish"}, ["sqx"] = {"Kufr Qassem Sign Language (KQSL)"}, ["sra"] = {"Saruga"}, ["srb"] = {"Sora"}, ["src"] = {"Logudorese Sardinian"}, ["sre"] = {"Sara"}, ["srf"] = {"Nafi"}, ["srg"] = {"Sulod"}, ["srh"] = {"Sarikoli"}, ["sri"] = {"Siriano"}, ["srk"] = {"Serudung Murut"}, ["srl"] = {"Isirawa"}, ["srm"] = {"Saramaccan"}, ["srn"] = {"Sranan Tongo"}, ["sro"] = {"Campidanese Sardinian"}, ["srq"] = {"Sirionó"}, ["srr"] = {"Serer"}, ["srs"] = {"Sarsi"}, ["srt"] = {"Sauri"}, ["sru"] = {"Suruí"}, ["srv"] = {"Southern Sorsoganon"}, ["srw"] = {"Serua"}, ["srx"] = {"Sirmauri"}, ["sry"] = {"Sera"}, ["srz"] = {"Shahmirzadi"}, ["ssa"] = {"Nilo-Saharan languages"}, ["ssb"] = {"Southern Sama"}, ["ssc"] = {"Suba-Simbiti"}, ["ssd"] = {"Siroi"}, ["sse"] = {"Balangingi", "Bangingih Sama"}, ["ssf"] = {"Thao"}, ["ssg"] = {"Seimat"}, ["ssh"] = {"Shihhi Arabic"}, ["ssi"] = {"Sansi"}, ["ssj"] = {"Sausi"}, ["ssk"] = {"Sunam"}, ["ssl"] = {"Western Sisaala"}, ["ssm"] = {"Semnam"}, ["ssn"] = {"Waata"}, ["sso"] = {"Sissano"}, ["ssp"] = {"Spanish Sign Language"}, ["ssq"] = {"So'a"}, ["ssr"] = {"Swiss-French Sign Language"}, ["sss"] = {"Sô"}, ["sst"] = {"Sinasina"}, ["ssu"] = {"Susuami"}, ["ssv"] = {"Shark Bay"}, ["ssx"] = {"Samberigi"}, ["ssy"] = {"Saho"}, ["ssz"] = {"Sengseng"}, ["sta"] = {"Settla"}, ["stb"] = {"Northern Subanen"}, ["std"] = {"Sentinel"}, ["ste"] = {"Liana-Seti"}, ["stf"] = {"Seta"}, ["stg"] = {"Trieng"}, ["sth"] = {"Shelta"}, ["sti"] = {"Bulo Stieng"}, ["stj"] = {"Matya Samo"}, ["stk"] = {"Arammba"}, ["stl"] = {"Stellingwerfs"}, ["stm"] = {"Setaman"}, ["stn"] = {"Owa"}, ["sto"] = {"Stoney"}, ["stp"] = {"Southeastern Tepehuan"}, ["stq"] = {"Saterfriesisch"}, ["str"] = {"Straits Salish"}, ["sts"] = {"Shumashti"}, ["stt"] = {"Budeh Stieng"}, ["stu"] = {"Samtao"}, ["stv"] = {"Silt'e"}, ["stw"] = {"Satawalese"}, ["sty"] = {"Siberian Tatar"}, ["sua"] = {"Sulka"}, ["sub"] = {"Suku"}, ["suc"] = {"Western Subanon"}, ["sue"] = {"Suena"}, ["sug"] = {"Suganga"}, ["sui"] = {"Suki"}, ["suj"] = {"Shubi"}, ["suk"] = {"Sukuma"}, ["suo"] = {"Bouni"}, ["suq"] = {"Tirmaga-Chai Suri", "Suri"}, ["sur"] = {"Mwaghavul"}, ["sus"] = {"Susu"}, ["sut"] = {"Subtiaba"}, ["suv"] = {"Puroik"}, ["suw"] = {"Sumbwa"}, ["sux"] = {"Sumerian"}, ["suy"] = {"Suyá"}, ["suz"] = {"Sunwar"}, ["sva"] = {"Svan"}, ["svb"] = {"Ulau-Suain"}, ["svc"] = {"Vincentian Creole English"}, ["sve"] = {"Serili"}, ["svk"] = {"Slovakian Sign Language"}, ["svm"] = {"Slavomolisano"}, ["svs"] = {"Savosavo"}, ["svx"] = {"Skalvian"}, ["swb"] = {"Maore Comorian"}, ["swc"] = {"Congo Swahili"}, ["swf"] = {"Sere"}, ["swg"] = {"Swabian"}, ["swh"] = {"Swahili (individual language)", "Kiswahili"}, ["swi"] = {"Sui"}, ["swj"] = {"Sira"}, ["swk"] = {"Malawi Sena"}, ["swl"] = {"Swedish Sign Language"}, ["swm"] = {"Samosa"}, ["swn"] = {"Sawknah"}, ["swo"] = {"Shanenawa"}, ["swp"] = {"Suau"}, ["swq"] = {"Sharwa"}, ["swr"] = {"Saweru"}, ["sws"] = {"Seluwasan"}, ["swt"] = {"Sawila"}, ["swu"] = {"Suwawa"}, ["swv"] = {"Shekhawati"}, ["sww"] = {"Sowa"}, ["swx"] = {"Suruahá"}, ["swy"] = {"Sarua"}, ["sxb"] = {"Suba"}, ["sxc"] = {"Sicanian"}, ["sxe"] = {"Sighu"}, ["sxg"] = {"Shuhi", "Shixing"}, ["sxk"] = {"Southern Kalapuya"}, ["sxl"] = {"Selian"}, ["sxm"] = {"Samre"}, ["sxn"] = {"Sangir"}, ["sxo"] = {"Sorothaptic"}, ["sxr"] = {"Saaroa"}, ["sxs"] = {"Sasaru"}, ["sxu"] = {"Upper Saxon"}, ["sxw"] = {"Saxwe Gbe"}, ["sya"] = {"Siang"}, ["syb"] = {"Central Subanen"}, ["syc"] = {"Classical Syriac"}, ["syd"] = {"Samoyedic languages"}, ["syi"] = {"Seki"}, ["syk"] = {"Sukur"}, ["syl"] = {"Sylheti"}, ["sym"] = {"Maya Samo"}, ["syn"] = {"Senaya"}, ["syo"] = {"Suoy"}, ["syr"] = {"Syriac"}, ["sys"] = {"Sinyar"}, ["syw"] = {"Kagate"}, ["syx"] = {"Samay"}, ["syy"] = {"Al-Sayyid Bedouin Sign Language"}, ["sza"] = {"Semelai"}, ["szb"] = {"Ngalum"}, ["szc"] = {"Semaq Beri"}, ["sze"] = {"Seze"}, ["szg"] = {"Sengele"}, ["szl"] = {"Silesian"}, ["szn"] = {"Sula"}, ["szp"] = {"Suabo"}, ["szs"] = {"Solomon Islands Sign Language"}, ["szv"] = {"Isu (Fako Division)"}, ["szw"] = {"Sawai"}, ["szy"] = {"Sakizaya"}, ["taa"] = {"Lower Tanana"}, ["tab"] = {"Tabassaran"}, ["tac"] = {"Lowland Tarahumara"}, ["tad"] = {"Tause"}, ["tae"] = {"Tariana"}, ["taf"] = {"Tapirapé"}, ["tag"] = {"Tagoi"}, ["tai"] = {"Tai languages"}, ["taj"] = {"Eastern Tamang"}, ["tak"] = {"Tala"}, ["tal"] = {"Tal"}, ["tan"] = {"Tangale"}, ["tao"] = {"Yami"}, ["tap"] = {"Taabwa"}, ["taq"] = {"Tamasheq"}, ["tar"] = {"Central Tarahumara"}, ["tas"] = {"Tay Boi"}, ["tau"] = {"Upper Tanana"}, ["tav"] = {"Tatuyo"}, ["taw"] = {"Tai"}, ["tax"] = {"Tamki"}, ["tay"] = {"Atayal"}, ["taz"] = {"Tocho"}, ["tba"] = {"Aikanã"}, ["tbc"] = {"Takia"}, ["tbd"] = {"Kaki Ae"}, ["tbe"] = {"Tanimbili"}, ["tbf"] = {"Mandara"}, ["tbg"] = {"North Tairora"}, ["tbh"] = {"Dharawal", "Thurawal"}, ["tbi"] = {"Gaam"}, ["tbj"] = {"Tiang"}, ["tbk"] = {"Calamian Tagbanwa"}, ["tbl"] = {"Tboli"}, ["tbm"] = {"Tagbu"}, ["tbn"] = {"Barro Negro Tunebo"}, ["tbo"] = {"Tawala"}, ["tbp"] = {"Taworta", "Diebroud"}, ["tbq"] = {"Tibeto-Burman languages"}, ["tbr"] = {"Tumtum"}, ["tbs"] = {"Tanguat"}, ["tbt"] = {"Tembo (Kitembo)"}, ["tbu"] = {"Tubar"}, ["tbv"] = {"Tobo"}, ["tbw"] = {"Tagbanwa"}, ["tbx"] = {"Kapin"}, ["tby"] = {"Tabaru"}, ["tbz"] = {"Ditammari"}, ["tca"] = {"Ticuna"}, ["tcb"] = {"Tanacross"}, ["tcc"] = {"Datooga"}, ["tcd"] = {"Tafi"}, ["tce"] = {"Southern Tutchone"}, ["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"}, ["tcg"] = {"Tamagario"}, ["tch"] = {"Turks And Caicos Creole English"}, ["tci"] = {"Wára"}, ["tck"] = {"Tchitchege"}, ["tcl"] = {"Taman (Myanmar)"}, ["tcm"] = {"Tanahmerah"}, ["tcn"] = {"Tichurong"}, ["tco"] = {"Taungyo"}, ["tcp"] = {"Tawr Chin"}, ["tcq"] = {"Kaiy"}, ["tcs"] = {"Torres Strait Creole", "Yumplatok"}, ["tct"] = {"T'en"}, ["tcu"] = {"Southeastern Tarahumara"}, ["tcw"] = {"Tecpatlán Totonac"}, ["tcx"] = {"Toda"}, ["tcy"] = {"Tulu"}, ["tcz"] = {"Thado Chin"}, ["tda"] = {"Tagdal"}, ["tdb"] = {"Panchpargania"}, ["tdc"] = {"Emberá-Tadó"}, ["tdd"] = {"Tai Nüa"}, ["tde"] = {"Tiranige Diga Dogon"}, ["tdf"] = {"Talieng"}, ["tdg"] = {"Western Tamang"}, ["tdh"] = {"Thulung"}, ["tdi"] = {"Tomadino"}, ["tdj"] = {"Tajio"}, ["tdk"] = {"Tambas"}, ["tdl"] = {"Sur"}, ["tdm"] = {"Taruma"}, ["tdn"] = {"Tondano"}, ["tdo"] = {"Teme"}, ["tdq"] = {"Tita"}, ["tdr"] = {"Todrah"}, ["tds"] = {"Doutai"}, ["tdt"] = {"Tetun Dili"}, ["tdv"] = {"Toro"}, ["tdx"] = {"Tandroy-Mahafaly Malagasy"}, ["tdy"] = {"Tadyawan"}, ["tea"] = {"Temiar"}, ["teb"] = {"Tetete"}, ["tec"] = {"Terik"}, ["ted"] = {"Tepo Krumen"}, ["tee"] = {"Huehuetla Tepehua"}, ["tef"] = {"Teressa"}, ["teg"] = {"Teke-Tege"}, ["teh"] = {"Tehuelche"}, ["tei"] = {"Torricelli"}, ["tek"] = {"Ibali Teke"}, ["tem"] = {"Timne"}, ["ten"] = {"Tama (Colombia)"}, ["teo"] = {"Teso"}, ["tep"] = {"Tepecano"}, ["teq"] = {"Temein"}, ["ter"] = {"Tereno"}, ["tes"] = {"Tengger"}, ["tet"] = {"Tetum"}, ["teu"] = {"Soo"}, ["tev"] = {"Teor"}, ["tew"] = {"Tewa (USA)"}, ["tex"] = {"Tennet"}, ["tey"] = {"Tulishi"}, ["tez"] = {"Tetserret"}, ["tfi"] = {"Tofin Gbe"}, ["tfn"] = {"Tanaina"}, ["tfo"] = {"Tefaro"}, ["tfr"] = {"Teribe"}, ["tft"] = {"Ternate"}, ["tga"] = {"Sagalla"}, ["tgb"] = {"Tobilung"}, ["tgc"] = {"Tigak"}, ["tgd"] = {"Ciwogai"}, ["tge"] = {"Eastern Gorkha Tamang"}, ["tgf"] = {"Chalikha"}, ["tgh"] = {"Tobagonian Creole English"}, ["tgi"] = {"Lawunuia"}, ["tgj"] = {"Tagin"}, ["tgn"] = {"Tandaganon"}, ["tgo"] = {"Sudest"}, ["tgp"] = {"Tangoa"}, ["tgq"] = {"Tring"}, ["tgr"] = {"Tareng"}, ["tgs"] = {"Nume"}, ["tgt"] = {"Central Tagbanwa"}, ["tgu"] = {"Tanggu"}, ["tgv"] = {"Tingui-Boto"}, ["tgw"] = {"Tagwana Senoufo"}, ["tgx"] = {"Tagish"}, ["tgy"] = {"Togoyo"}, ["tgz"] = {"Tagalaka"}, ["thd"] = {"Kuuk Thaayorre", "Thayore"}, ["the"] = {"Chitwania Tharu"}, ["thf"] = {"Thangmi"}, ["thh"] = {"Northern Tarahumara"}, ["thi"] = {"Tai Long"}, ["thk"] = {"Tharaka", "Kitharaka"}, ["thl"] = {"Dangaura Tharu"}, ["thm"] = {"Aheu"}, ["thn"] = {"Thachanadan"}, ["thp"] = {"Thompson"}, ["thq"] = {"Kochila Tharu"}, ["thr"] = {"Rana Tharu"}, ["ths"] = {"Thakali"}, ["tht"] = {"Tahltan"}, ["thu"] = {"Thuri"}, ["thv"] = {"Tahaggart Tamahaq"}, ["thy"] = {"Tha"}, ["thz"] = {"Tayart Tamajeq"}, ["tia"] = {"Tidikelt Tamazight"}, ["tic"] = {"Tira"}, ["tif"] = {"Tifal"}, ["tig"] = {"Tigre"}, ["tih"] = {"Timugon Murut"}, ["tii"] = {"Tiene"}, ["tij"] = {"Tilung"}, ["tik"] = {"Tikar"}, ["til"] = {"Tillamook"}, ["tim"] = {"Timbe"}, ["tin"] = {"Tindi"}, ["tio"] = {"Teop"}, ["tip"] = {"Trimuris"}, ["tiq"] = {"Tiéfo"}, ["tis"] = {"Masadiit Itneg"}, ["tit"] = {"Tinigua"}, ["tiu"] = {"Adasen"}, ["tiv"] = {"Tiv"}, ["tiw"] = {"Tiwi"}, ["tix"] = {"Southern Tiwa"}, ["tiy"] = {"Tiruray"}, ["tiz"] = {"Tai Hongjin"}, ["tja"] = {"Tajuasohn"}, ["tjg"] = {"Tunjung"}, ["tji"] = {"Northern Tujia"}, ["tjj"] = {"Tjungundji"}, ["tjl"] = {"Tai Laing"}, ["tjm"] = {"Timucua"}, ["tjn"] = {"Tonjon"}, ["tjo"] = {"Temacine Tamazight"}, ["tjp"] = {"Tjupany"}, ["tjs"] = {"Southern Tujia"}, ["tju"] = {"Tjurruru"}, ["tjw"] = {"Djabwurrung"}, ["tka"] = {"Truká"}, ["tkb"] = {"Buksa"}, ["tkd"] = {"Tukudede"}, ["tke"] = {"Takwane"}, ["tkf"] = {"Tukumanféd"}, ["tkg"] = {"Tesaka Malagasy"}, ["tkl"] = {"Tokelau"}, ["tkm"] = {"Takelma"}, ["tkn"] = {"Toku-No-Shima"}, ["tkp"] = {"Tikopia"}, ["tkq"] = {"Tee"}, ["tkr"] = {"Tsakhur"}, ["tks"] = {"Takestani"}, ["tkt"] = {"Kathoriya Tharu"}, ["tku"] = {"Upper Necaxa Totonac"}, ["tkv"] = {"Mur Pano"}, ["tkw"] = {"Teanu"}, ["tkx"] = {"Tangko"}, ["tkz"] = {"Takua"}, ["tla"] = {"Southwestern Tepehuan"}, ["tlb"] = {"Tobelo"}, ["tlc"] = {"Yecuatla Totonac"}, ["tld"] = {"Talaud"}, ["tlf"] = {"Telefol"}, ["tlg"] = {"Tofanma"}, ["tlh"] = {"Klingon", "tlhIngan Hol"}, ["tli"] = {"Tlingit"}, ["tlj"] = {"Talinga-Bwisi"}, ["tlk"] = {"Taloki"}, ["tll"] = {"Tetela"}, ["tlm"] = {"Tolomako"}, ["tln"] = {"Talondo'"}, ["tlo"] = {"Talodi"}, ["tlp"] = {"Filomena Mata-Coahuitlán Totonac"}, ["tlq"] = {"Tai Loi"}, ["tlr"] = {"Talise"}, ["tls"] = {"Tambotalo"}, ["tlt"] = {"Sou Nama", "Teluti"}, ["tlu"] = {"Tulehu"}, ["tlv"] = {"Taliabu"}, ["tlx"] = {"Khehek"}, ["tly"] = {"Talysh"}, ["tma"] = {"Tama (Chad)"}, ["tmb"] = {"Katbol", "Avava"}, ["tmc"] = {"Tumak"}, ["tmd"] = {"Haruai"}, ["tme"] = {"Tremembé"}, ["tmf"] = {"Toba-Maskoy"}, ["tmg"] = {"Ternateño"}, ["tmh"] = {"Tamashek"}, ["tmi"] = {"Tutuba"}, ["tmj"] = {"Samarokena"}, ["tml"] = {"Tamnim Citak"}, ["tmm"] = {"Tai Thanh"}, ["tmn"] = {"Taman (Indonesia)"}, ["tmo"] = {"Temoq"}, ["tmq"] = {"Tumleo"}, ["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"}, ["tms"] = {"Tima"}, ["tmt"] = {"Tasmate"}, ["tmu"] = {"Iau"}, ["tmv"] = {"Tembo (Motembo)"}, ["tmw"] = {"Temuan"}, ["tmy"] = {"Tami"}, ["tmz"] = {"Tamanaku"}, ["tna"] = {"Tacana"}, ["tnb"] = {"Western Tunebo"}, ["tnc"] = {"Tanimuca-Retuarã"}, ["tnd"] = {"Angosturas Tunebo"}, ["tng"] = {"Tobanga"}, ["tnh"] = {"Maiani"}, ["tni"] = {"Tandia"}, ["tnk"] = {"Kwamera"}, ["tnl"] = {"Lenakel"}, ["tnm"] = {"Tabla"}, ["tnn"] = {"North Tanna"}, ["tno"] = {"Toromono"}, ["tnp"] = {"Whitesands"}, ["tnq"] = {"Taino"}, ["tnr"] = {"Ménik"}, ["tns"] = {"Tenis"}, ["tnt"] = {"Tontemboan"}, ["tnu"] = {"Tay Khang"}, ["tnv"] = {"Tangchangya"}, ["tnw"] = {"Tonsawang"}, ["tnx"] = {"Tanema"}, ["tny"] = {"Tongwe"}, ["tnz"] = {"Ten'edn"}, ["tob"] = {"Toba"}, ["toc"] = {"Coyutla Totonac"}, ["tod"] = {"Toma"}, ["tof"] = {"Gizrra"}, ["tog"] = {"Tonga (Nyasa)"}, ["toh"] = {"Gitonga"}, ["toi"] = {"Tonga (Zambia)"}, ["toj"] = {"Tojolabal"}, ["tok"] = {"Toki Pona"}, ["tol"] = {"Tolowa"}, ["tom"] = {"Tombulu"}, ["too"] = {"Xicotepec De Juárez Totonac"}, ["top"] = {"Papantla Totonac"}, ["toq"] = {"Toposa"}, ["tor"] = {"Togbo-Vara Banda"}, ["tos"] = {"Highland Totonac"}, ["tou"] = {"Tho"}, ["tov"] = {"Upper Taromi"}, ["tow"] = {"Jemez"}, ["tox"] = {"Tobian"}, ["toy"] = {"Topoiyo"}, ["toz"] = {"To"}, ["tpa"] = {"Taupota"}, ["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"}, ["tpe"] = {"Tippera"}, ["tpf"] = {"Tarpia"}, ["tpg"] = {"Kula"}, ["tpi"] = {"Tok Pisin"}, ["tpj"] = {"Tapieté"}, ["tpk"] = {"Tupinikin"}, ["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"}, ["tpm"] = {"Tampulma"}, ["tpn"] = {"Tupinambá"}, ["tpo"] = {"Tai Pao"}, ["tpp"] = {"Pisaflores Tepehua"}, ["tpq"] = {"Tukpa"}, ["tpr"] = {"Tuparí"}, ["tpt"] = {"Tlachichilco Tepehua"}, ["tpu"] = {"Tampuan"}, ["tpv"] = {"Tanapag"}, ["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"}, ["tpy"] = {"Trumai"}, ["tpz"] = {"Tinputz"}, ["tqb"] = {"Tembé"}, ["tql"] = {"Lehali"}, ["tqm"] = {"Turumsa"}, ["tqn"] = {"Tenino"}, ["tqo"] = {"Toaripi"}, ["tqp"] = {"Tomoip"}, ["tqq"] = {"Tunni"}, ["tqr"] = {"Torona"}, ["tqt"] = {"Western Totonac"}, ["tqu"] = {"Touo"}, ["tqw"] = {"Tonkawa"}, ["tra"] = {"Tirahi"}, ["trb"] = {"Terebu"}, ["trc"] = {"Copala Triqui"}, ["trd"] = {"Turi"}, ["tre"] = {"East Tarangan"}, ["trf"] = {"Trinidadian Creole English"}, ["trg"] = {"Lishán Didán"}, ["trh"] = {"Turaka"}, ["tri"] = {"Trió"}, ["trj"] = {"Toram"}, ["trk"] = {"Turkic languages"}, ["trl"] = {"Traveller Scottish"}, ["trm"] = {"Tregami"}, ["trn"] = {"Trinitario"}, ["tro"] = {"Tarao Naga"}, ["trp"] = {"Kok Borok"}, ["trq"] = {"San Martín Itunyoso Triqui"}, ["trr"] = {"Taushiro"}, ["trs"] = {"Chicahuaxtla Triqui"}, ["trt"] = {"Tunggare"}, ["tru"] = {"Turoyo", "Surayt"}, ["trv"] = {"Sediq", "Seediq", "Taroko"}, ["trw"] = {"Torwali"}, ["trx"] = {"Tringgus-Sembaan Bidayuh"}, ["try"] = {"Turung"}, ["trz"] = {"Torá"}, ["tsa"] = {"Tsaangi"}, ["tsb"] = {"Tsamai"}, ["tsc"] = {"Tswa"}, ["tsd"] = {"Tsakonian"}, ["tse"] = {"Tunisian Sign Language"}, ["tsg"] = {"Tausug"}, ["tsh"] = {"Tsuvan"}, ["tsi"] = {"Tsimshian"}, ["tsj"] = {"Tshangla"}, ["tsk"] = {"Tseku"}, ["tsl"] = {"Ts'ün-Lao"}, ["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"}, ["tsp"] = {"Northern Toussian"}, ["tsq"] = {"Thai Sign Language"}, ["tsr"] = {"Akei"}, ["tss"] = {"Taiwan Sign Language"}, ["tst"] = {"Tondi Songway Kiini"}, ["tsu"] = {"Tsou"}, ["tsv"] = {"Tsogo"}, ["tsw"] = {"Tsishingini"}, ["tsx"] = {"Mubami"}, ["tsy"] = {"Tebul Sign Language"}, ["tsz"] = {"Purepecha"}, ["tta"] = {"Tutelo"}, ["ttb"] = {"Gaa"}, ["ttc"] = {"Tektiteko"}, ["ttd"] = {"Tauade"}, ["tte"] = {"Bwanabwana"}, ["ttf"] = {"Tuotomb"}, ["ttg"] = {"Tutong"}, ["tth"] = {"Upper Ta'oih"}, ["tti"] = {"Tobati"}, ["ttj"] = {"Tooro"}, ["ttk"] = {"Totoro"}, ["ttl"] = {"Totela"}, ["ttm"] = {"Northern Tutchone"}, ["ttn"] = {"Towei"}, ["tto"] = {"Lower Ta'oih"}, ["ttp"] = {"Tombelala"}, ["ttq"] = {"Tawallammat Tamajaq"}, ["ttr"] = {"Tera"}, ["tts"] = {"Northeastern Thai"}, ["ttt"] = {"Muslim Tat"}, ["ttu"] = {"Torau"}, ["ttv"] = {"Titan"}, ["ttw"] = {"Long Wat"}, ["tty"] = {"Sikaritai"}, ["ttz"] = {"Tsum"}, ["tua"] = {"Wiarumus"}, ["tub"] = {"Tübatulabal"}, ["tuc"] = {"Mutu"}, ["tud"] = {"Tuxá"}, ["tue"] = {"Tuyuca"}, ["tuf"] = {"Central Tunebo"}, ["tug"] = {"Tunia"}, ["tuh"] = {"Taulil"}, ["tui"] = {"Tupuri"}, ["tuj"] = {"Tugutil"}, ["tul"] = {"Tula"}, ["tum"] = {"Tumbuka"}, ["tun"] = {"Tunica"}, ["tuo"] = {"Tucano"}, ["tup"] = {"Tupi languages"}, ["tuq"] = {"Tedaga"}, ["tus"] = {"Tuscarora"}, ["tut"] = {"Altaic languages"}, ["tuu"] = {"Tututni"}, ["tuv"] = {"Turkana"}, ["tuw"] = {"Tungus languages"}, ["tux"] = {"Tuxináwa"}, ["tuy"] = {"Tugen"}, ["tuz"] = {"Turka"}, ["tva"] = {"Vaghua"}, ["tvd"] = {"Tsuvadi"}, ["tve"] = {"Te'un"}, ["tvi"] = {"Tulai"}, ["tvk"] = {"Southeast Ambrym"}, ["tvl"] = {"Tuvalu"}, ["tvm"] = {"Tela-Masbuar"}, ["tvn"] = {"Tavoyan"}, ["tvo"] = {"Tidore"}, ["tvs"] = {"Taveta"}, ["tvt"] = {"Tutsa Naga"}, ["tvu"] = {"Tunen"}, ["tvw"] = {"Sedoa"}, ["tvx"] = {"Taivoan"}, ["tvy"] = {"Timor Pidgin"}, ["twa"] = {"Twana"}, ["twb"] = {"Western Tawbuid"}, ["twc"] = {"Teshenawa"}, ["twd"] = {"Twents"}, ["twe"] = {"Tewa (Indonesia)"}, ["twf"] = {"Northern Tiwa"}, ["twg"] = {"Tereweng"}, ["twh"] = {"Tai Dón"}, ["twl"] = {"Tawara"}, ["twm"] = {"Tawang Monpa"}, ["twn"] = {"Twendi"}, ["two"] = {"Tswapong"}, ["twp"] = {"Ere"}, ["twq"] = {"Tasawaq"}, ["twr"] = {"Southwestern Tarahumara"}, ["twt"] = {"Turiwára"}, ["twu"] = {"Termanu"}, ["tww"] = {"Tuwari"}, ["twx"] = {"Tewe"}, ["twy"] = {"Tawoyan"}, ["txa"] = {"Tombonuo"}, ["txb"] = {"Tokharian B"}, ["txc"] = {"Tsetsaut"}, ["txe"] = {"Totoli"}, ["txg"] = {"Tangut"}, ["txh"] = {"Thracian"}, ["txi"] = {"Ikpeng"}, ["txj"] = {"Tarjumo"}, ["txm"] = {"Tomini"}, ["txn"] = {"West Tarangan"}, ["txo"] = {"Toto"}, ["txq"] = {"Tii"}, ["txr"] = {"Tartessian"}, ["txs"] = {"Tonsea"}, ["txt"] = {"Citak"}, ["txu"] = {"Kayapó"}, ["txx"] = {"Tatana"}, ["txy"] = {"Tanosy Malagasy"}, ["tya"] = {"Tauya"}, ["tye"] = {"Kyanga"}, ["tyh"] = {"O'du"}, ["tyi"] = {"Teke-Tsaayi"}, ["tyj"] = {"Tai Do", "Tai Yo"}, ["tyl"] = {"Thu Lao"}, ["tyn"] = {"Kombai"}, ["typ"] = {"Thaypan"}, ["tyr"] = {"Tai Daeng"}, ["tys"] = {"Tày Sa Pa"}, ["tyt"] = {"Tày Tac"}, ["tyu"] = {"Kua"}, ["tyv"] = {"Tuvinian"}, ["tyx"] = {"Teke-Tyee"}, ["tyy"] = {"Tiyaa"}, ["tyz"] = {"Tày"}, ["tza"] = {"Tanzanian Sign Language"}, ["tzh"] = {"Tzeltal"}, ["tzj"] = {"Tz'utujil"}, ["tzl"] = {"Talossan"}, ["tzm"] = {"Central Atlas Tamazight"}, ["tzn"] = {"Tugun"}, ["tzo"] = {"Tzotzil"}, ["tzx"] = {"Tabriak"}, ["uam"] = {"Uamué"}, ["uan"] = {"Kuan"}, ["uar"] = {"Tairuma"}, ["uba"] = {"Ubang"}, ["ubi"] = {"Ubi"}, ["ubl"] = {"Buhi'non Bikol"}, ["ubr"] = {"Ubir"}, ["ubu"] = {"Umbu-Ungu"}, ["uby"] = {"Ubykh"}, ["uda"] = {"Uda"}, ["ude"] = {"Udihe"}, ["udg"] = {"Muduga"}, ["udi"] = {"Udi"}, ["udj"] = {"Ujir"}, ["udl"] = {"Wuzlam"}, ["udm"] = {"Udmurt"}, ["udu"] = {"Uduk"}, ["ues"] = {"Kioko"}, ["ufi"] = {"Ufim"}, ["uga"] = {"Ugaritic"}, ["ugb"] = {"Kuku-Ugbanh"}, ["uge"] = {"Ughele"}, ["ugh"] = {"Kubachi"}, ["ugn"] = {"Ugandan Sign Language"}, ["ugo"] = {"Ugong"}, ["ugy"] = {"Uruguayan Sign Language"}, ["uha"] = {"Uhami"}, ["uhn"] = {"Damal"}, ["uis"] = {"Uisai"}, ["uiv"] = {"Iyive"}, ["uji"] = {"Tanjijili"}, ["uka"] = {"Kaburi"}, ["ukg"] = {"Ukuriguma"}, ["ukh"] = {"Ukhwejo"}, ["uki"] = {"Kui (India)"}, ["ukk"] = {"Muak Sa-aak"}, ["ukl"] = {"Ukrainian Sign Language"}, ["ukp"] = {"Ukpe-Bayobiri"}, ["ukq"] = {"Ukwa"}, ["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"}, ["uku"] = {"Ukue"}, ["ukv"] = {"Kuku"}, ["ukw"] = {"Ukwuani-Aboh-Ndoni"}, ["uky"] = {"Kuuk-Yak"}, ["ula"] = {"Fungwa"}, ["ulb"] = {"Ulukwumi"}, ["ulc"] = {"Ulch"}, ["ule"] = {"Lule"}, ["ulf"] = {"Usku", "Afra"}, ["uli"] = {"Ulithian"}, ["ulk"] = {"Meriam Mir"}, ["ull"] = {"Ullatan"}, ["ulm"] = {"Ulumanda'"}, ["uln"] = {"Unserdeutsch"}, ["ulu"] = {"Uma' Lung"}, ["ulw"] = {"Ulwa"}, ["uly"] = {"Buli"}, ["uma"] = {"Umatilla"}, ["umb"] = {"Umbundu"}, ["umc"] = {"Marrucinian"}, ["umd"] = {"Umbindhamu"}, ["umg"] = {"Morrobalama", "Umbuygamu"}, ["umi"] = {"Ukit"}, ["umm"] = {"Umon"}, ["umn"] = {"Makyan Naga"}, ["umo"] = {"Umotína"}, ["ump"] = {"Umpila"}, ["umr"] = {"Umbugarla"}, ["ums"] = {"Pendau"}, ["umu"] = {"Munsee"}, ["una"] = {"North Watut"}, ["und"] = {"Undetermined"}, ["une"] = {"Uneme"}, ["ung"] = {"Ngarinyin"}, ["uni"] = {"Uni"}, ["unk"] = {"Enawené-Nawé"}, ["unm"] = {"Unami"}, ["unn"] = {"Kurnai"}, ["unr"] = {"Mundari"}, ["unu"] = {"Unubahe"}, ["unx"] = {"Munda"}, ["unz"] = {"Unde Kaili"}, ["uon"] = {"Kulon"}, ["upi"] = {"Umeda"}, ["upv"] = {"Uripiv-Wala-Rano-Atchin"}, ["ura"] = {"Urarina"}, ["urb"] = {"Urubú-Kaapor", "Kaapor"}, ["urc"] = {"Urningangg"}, ["ure"] = {"Uru"}, ["urf"] = {"Uradhi"}, ["urg"] = {"Urigina"}, ["urh"] = {"Urhobo"}, ["uri"] = {"Urim"}, ["urj"] = {"Uralic languages"}, ["urk"] = {"Urak Lawoi'"}, ["url"] = {"Urali"}, ["urm"] = {"Urapmin"}, ["urn"] = {"Uruangnirin"}, ["uro"] = {"Ura (Papua New Guinea)"}, ["urp"] = {"Uru-Pa-In"}, ["urr"] = {"Lehalurup", "Löyöp"}, ["urt"] = {"Urat"}, ["uru"] = {"Urumi"}, ["urv"] = {"Uruava"}, ["urw"] = {"Sop"}, ["urx"] = {"Urimo"}, ["ury"] = {"Orya"}, ["urz"] = {"Uru-Eu-Wau-Wau"}, ["usa"] = {"Usarufa"}, ["ush"] = {"Ushojo"}, ["usi"] = {"Usui"}, ["usk"] = {"Usaghade"}, ["usp"] = {"Uspanteco"}, ["uss"] = {"us-Saare"}, ["usu"] = {"Uya"}, ["uta"] = {"Otank"}, ["ute"] = {"Ute-Southern Paiute"}, ["uth"] = {"ut-Hun"}, ["utp"] = {"Amba (Solomon Islands)"}, ["utr"] = {"Etulo"}, ["utu"] = {"Utu"}, ["uum"] = {"Urum"}, ["uur"] = {"Ura (Vanuatu)"}, ["uuu"] = {"U"}, ["uve"] = {"West Uvean", "Fagauvea"}, ["uvh"] = {"Uri"}, ["uvl"] = {"Lote"}, ["uwa"] = {"Kuku-Uwanh"}, ["uya"] = {"Doko-Uyanga"}, ["uzn"] = {"Northern Uzbek"}, ["uzs"] = {"Southern Uzbek"}, ["vaa"] = {"Vaagri Booli"}, ["vae"] = {"Vale"}, ["vaf"] = {"Vafsi"}, ["vag"] = {"Vagla"}, ["vah"] = {"Varhadi-Nagpuri"}, ["vai"] = {"Vai"}, ["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"}, ["val"] = {"Vehes"}, ["vam"] = {"Vanimo"}, ["van"] = {"Valman"}, ["vao"] = {"Vao"}, ["vap"] = {"Vaiphei"}, ["var"] = {"Huarijio"}, ["vas"] = {"Vasavi"}, ["vau"] = {"Vanuma"}, ["vav"] = {"Varli"}, ["vay"] = {"Wayu"}, ["vbb"] = {"Southeast Babar"}, ["vbk"] = {"Southwestern Bontok"}, ["vec"] = {"Venetian"}, ["ved"] = {"Veddah"}, ["vel"] = {"Veluws"}, ["vem"] = {"Vemgo-Mabas"}, ["veo"] = {"Ventureño"}, ["vep"] = {"Veps"}, ["ver"] = {"Mom Jango"}, ["vgr"] = {"Vaghri"}, ["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"}, ["vic"] = {"Virgin Islands Creole English"}, ["vid"] = {"Vidunda"}, ["vif"] = {"Vili"}, ["vig"] = {"Viemo"}, ["vil"] = {"Vilela"}, ["vin"] = {"Vinza"}, ["vis"] = {"Vishavan"}, ["vit"] = {"Viti"}, ["viv"] = {"Iduna"}, ["vjk"] = {"Bajjika"}, ["vka"] = {"Kariyarra"}, ["vkj"] = {"Kujarge"}, ["vkk"] = {"Kaur"}, ["vkl"] = {"Kulisusu"}, ["vkm"] = {"Kamakan"}, ["vkn"] = {"Koro Nulu"}, ["vko"] = {"Kodeoha"}, ["vkp"] = {"Korlai Creole Portuguese"}, ["vkt"] = {"Tenggarong Kutai Malay"}, ["vku"] = {"Kurrama"}, ["vkz"] = {"Koro Zuba"}, ["vlp"] = {"Valpei"}, ["vls"] = {"Vlaams"}, ["vma"] = {"Martuyhunira"}, ["vmb"] = {"Barbaram"}, ["vmc"] = {"Juxtlahuaca Mixtec"}, ["vmd"] = {"Mudu Koraga"}, ["vme"] = {"East Masela"}, ["vmf"] = {"Mainfränkisch"}, ["vmg"] = {"Lungalunga"}, ["vmh"] = {"Maraghei"}, ["vmi"] = {"Miwa"}, ["vmj"] = {"Ixtayutla Mixtec"}, ["vmk"] = {"Makhuwa-Shirima"}, ["vml"] = {"Malgana"}, ["vmm"] = {"Mitlatongo Mixtec"}, ["vmp"] = {"Soyaltepec Mazatec"}, ["vmq"] = {"Soyaltepec Mixtec"}, ["vmr"] = {"Marenje"}, ["vms"] = {"Moksela"}, ["vmu"] = {"Muluridyi"}, ["vmv"] = {"Valley Maidu"}, ["vmw"] = {"Makhuwa"}, ["vmx"] = {"Tamazola Mixtec"}, ["vmy"] = {"Ayautla Mazatec"}, ["vmz"] = {"Mazatlán Mazatec"}, ["vnk"] = {"Vano", "Lovono"}, ["vnm"] = {"Vinmavis", "Neve'ei"}, ["vnp"] = {"Vunapu"}, ["vor"] = {"Voro"}, ["vot"] = {"Votic"}, ["vra"] = {"Vera'a"}, ["vro"] = {"Võro"}, ["vrs"] = {"Varisi"}, ["vrt"] = {"Burmbar", "Banam Bay"}, ["vsi"] = {"Moldova Sign Language"}, ["vsl"] = {"Venezuelan Sign Language"}, ["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"}, ["vto"] = {"Vitou"}, ["vum"] = {"Vumbu"}, ["vun"] = {"Vunjo"}, ["vut"] = {"Vute"}, ["vwa"] = {"Awa (China)"}, ["waa"] = {"Walla Walla"}, ["wab"] = {"Wab"}, ["wac"] = {"Wasco-Wishram"}, ["wad"] = {"Wamesa", "Wondama"}, ["wae"] = {"Walser"}, ["waf"] = {"Wakoná"}, ["wag"] = {"Wa'ema"}, ["wah"] = {"Watubela"}, ["wai"] = {"Wares"}, ["waj"] = {"Waffa"}, ["wak"] = {"Wakashan languages"}, ["wal"] = {"Wolaytta", "Wolaitta"}, ["wam"] = {"Wampanoag"}, ["wan"] = {"Wan"}, ["wao"] = {"Wappo"}, ["wap"] = {"Wapishana"}, ["waq"] = {"Wagiman"}, ["war"] = {"Waray (Philippines)"}, ["was"] = {"Washo"}, ["wat"] = {"Kaninuwa"}, ["wau"] = {"Waurá"}, ["wav"] = {"Waka"}, ["waw"] = {"Waiwai"}, ["wax"] = {"Watam", "Marangis"}, ["way"] = {"Wayana"}, ["waz"] = {"Wampur"}, ["wba"] = {"Warao"}, ["wbb"] = {"Wabo"}, ["wbe"] = {"Waritai"}, ["wbf"] = {"Wara"}, ["wbh"] = {"Wanda"}, ["wbi"] = {"Vwanji"}, ["wbj"] = {"Alagwa"}, ["wbk"] = {"Waigali"}, ["wbl"] = {"Wakhi"}, ["wbm"] = {"Wa"}, ["wbp"] = {"Warlpiri"}, ["wbq"] = {"Waddar"}, ["wbr"] = {"Wagdi"}, ["wbs"] = {"West Bengal Sign Language"}, ["wbt"] = {"Warnman"}, ["wbv"] = {"Wajarri"}, ["wbw"] = {"Woi"}, ["wca"] = {"Yanomámi"}, ["wci"] = {"Waci Gbe"}, ["wdd"] = {"Wandji"}, ["wdg"] = {"Wadaginam"}, ["wdj"] = {"Wadjiginy"}, ["wdk"] = {"Wadikali"}, ["wdt"] = {"Wendat"}, ["wdu"] = {"Wadjigu"}, ["wdy"] = {"Wadjabangayi"}, ["wea"] = {"Wewaw"}, ["wec"] = {"Wè Western"}, ["wed"] = {"Wedau"}, ["weg"] = {"Wergaia"}, ["weh"] = {"Weh"}, ["wei"] = {"Kiunum"}, ["wem"] = {"Weme Gbe"}, ["wen"] = {"Sorbian languages"}, ["weo"] = {"Wemale"}, ["wep"] = {"Westphalien"}, ["wer"] = {"Weri"}, ["wes"] = {"Cameroon Pidgin"}, ["wet"] = {"Perai"}, ["weu"] = {"Rawngtu Chin"}, ["wew"] = {"Wejewa"}, ["wfg"] = {"Yafi", "Zorop"}, ["wga"] = {"Wagaya"}, ["wgb"] = {"Wagawaga"}, ["wgg"] = {"Wangkangurru", "Wangganguru"}, ["wgi"] = {"Wahgi"}, ["wgo"] = {"Waigeo"}, ["wgu"] = {"Wirangu"}, ["wgy"] = {"Warrgamay"}, ["wha"] = {"Sou Upaa", "Manusela"}, ["whg"] = {"North Wahgi"}, ["whk"] = {"Wahau Kenyah"}, ["whu"] = {"Wahau Kayan"}, ["wib"] = {"Southern Toussian"}, ["wic"] = {"Wichita"}, ["wie"] = {"Wik-Epa"}, ["wif"] = {"Wik-Keyangan"}, ["wig"] = {"Wik Ngathan"}, ["wih"] = {"Wik-Me'anha"}, ["wii"] = {"Minidien"}, ["wij"] = {"Wik-Iiyanh"}, ["wik"] = {"Wikalkan"}, ["wil"] = {"Wilawila"}, ["wim"] = {"Wik-Mungkan"}, ["win"] = {"Ho-Chunk"}, ["wir"] = {"Wiraféd"}, ["wiu"] = {"Wiru"}, ["wiv"] = {"Vitu"}, ["wiy"] = {"Wiyot"}, ["wja"] = {"Waja"}, ["wji"] = {"Warji"}, ["wka"] = {"Kw'adza"}, ["wkb"] = {"Kumbaran"}, ["wkd"] = {"Wakde", "Mo"}, ["wkl"] = {"Kalanadi"}, ["wkr"] = {"Keerray-Woorroong"}, ["wku"] = {"Kunduvadi"}, ["wkw"] = {"Wakawaka"}, ["wky"] = {"Wangkayutyuru"}, ["wla"] = {"Walio"}, ["wlc"] = {"Mwali Comorian"}, ["wle"] = {"Wolane"}, ["wlg"] = {"Kunbarlang"}, ["wlh"] = {"Welaun"}, ["wli"] = {"Waioli"}, ["wlk"] = {"Wailaki"}, ["wll"] = {"Wali (Sudan)"}, ["wlm"] = {"Middle Welsh"}, ["wlo"] = {"Wolio"}, ["wlr"] = {"Wailapa"}, ["wls"] = {"Wallisian"}, ["wlu"] = {"Wuliwuli"}, ["wlv"] = {"Wichí Lhamtés Vejoz"}, ["wlw"] = {"Walak"}, ["wlx"] = {"Wali (Ghana)"}, ["wly"] = {"Waling"}, ["wma"] = {"Mawa (Nigeria)"}, ["wmb"] = {"Wambaya"}, ["wmc"] = {"Wamas"}, ["wmd"] = {"Mamaindé"}, ["wme"] = {"Wambule"}, ["wmg"] = {"Western Minyag"}, ["wmh"] = {"Waima'a"}, ["wmi"] = {"Wamin"}, ["wmm"] = {"Maiwa (Indonesia)"}, ["wmn"] = {"Waamwang"}, ["wmo"] = {"Wom (Papua New Guinea)"}, ["wms"] = {"Wambon"}, ["wmt"] = {"Walmajarri"}, ["wmw"] = {"Mwani"}, ["wmx"] = {"Womo"}, ["wnb"] = {"Mokati"}, ["wnc"] = {"Wantoat"}, ["wnd"] = {"Wandarang"}, ["wne"] = {"Waneci"}, ["wng"] = {"Wanggom"}, ["wni"] = {"Ndzwani Comorian"}, ["wnk"] = {"Wanukaka"}, ["wnm"] = {"Wanggamala"}, ["wnn"] = {"Wunumara"}, ["wno"] = {"Wano"}, ["wnp"] = {"Wanap"}, ["wnu"] = {"Usan"}, ["wnw"] = {"Wintu"}, ["wny"] = {"Wanyi", "Waanyi"}, ["woa"] = {"Kuwema", "Tyaraity"}, ["wob"] = {"Wè Northern"}, ["woc"] = {"Wogeo"}, ["wod"] = {"Wolani"}, ["woe"] = {"Woleaian"}, ["wof"] = {"Gambian Wolof"}, ["wog"] = {"Wogamusin"}, ["woi"] = {"Kamang"}, ["wok"] = {"Longto"}, ["wom"] = {"Wom (Nigeria)"}, ["won"] = {"Wongo"}, ["woo"] = {"Manombai"}, ["wor"] = {"Woria"}, ["wos"] = {"Hanga Hundi"}, ["wow"] = {"Wawonii"}, ["woy"] = {"Weyto"}, ["wpc"] = {"Maco"}, ["wrb"] = {"Waluwarra", "Warluwara"}, ["wrg"] = {"Warungu", "Gudjal"}, ["wrh"] = {"Wiradjuri"}, ["wri"] = {"Wariyangga"}, ["wrk"] = {"Garrwa"}, ["wrl"] = {"Warlmanpa"}, ["wrm"] = {"Warumungu"}, ["wrn"] = {"Warnang"}, ["wro"] = {"Worrorra"}, ["wrp"] = {"Waropen"}, ["wrr"] = {"Wardaman"}, ["wrs"] = {"Waris"}, ["wru"] = {"Waru"}, ["wrv"] = {"Waruna"}, ["wrw"] = {"Gugu Warra"}, ["wrx"] = {"Wae Rana"}, ["wry"] = {"Merwari"}, ["wrz"] = {"Waray (Australia)"}, ["wsa"] = {"Warembori"}, ["wsg"] = {"Adilabad Gondi"}, ["wsi"] = {"Wusi"}, ["wsk"] = {"Waskia"}, ["wsr"] = {"Owenia"}, ["wss"] = {"Wasa"}, ["wsu"] = {"Wasu"}, ["wsv"] = {"Wotapuri-Katarqalai"}, ["wtb"] = {"Matambwe"}, ["wtf"] = {"Watiwa"}, ["wth"] = {"Wathawurrung"}, ["wti"] = {"Berta"}, ["wtk"] = {"Watakataui"}, ["wtm"] = {"Mewati"}, ["wtw"] = {"Wotu"}, ["wua"] = {"Wikngenchera"}, ["wub"] = {"Wunambal"}, ["wud"] = {"Wudu"}, ["wuh"] = {"Wutunhua"}, ["wul"] = {"Silimo"}, ["wum"] = {"Wumbvu"}, ["wun"] = {"Bungu"}, ["wur"] = {"Wurrugu"}, ["wut"] = {"Wutung"}, ["wuu"] = {"Wu Chinese"}, ["wuv"] = {"Wuvulu-Aua"}, ["wux"] = {"Wulna"}, ["wuy"] = {"Wauyai"}, ["wwa"] = {"Waama"}, ["wwb"] = {"Wakabunga"}, ["wwo"] = {"Wetamut", "Dorig"}, ["wwr"] = {"Warrwa"}, ["www"] = {"Wawa"}, ["wxa"] = {"Waxianghua"}, ["wxw"] = {"Wardandi"}, ["wyb"] = {"Wangaaybuwan-Ngiyambaa"}, ["wyi"] = {"Woiwurrung"}, ["wym"] = {"Wymysorys"}, ["wyn"] = {"Wyandot"}, ["wyr"] = {"Wayoró"}, ["wyy"] = {"Western Fijian"}, ["xaa"] = {"Andalusian Arabic"}, ["xab"] = {"Sambe"}, ["xac"] = {"Kachari"}, ["xad"] = {"Adai"}, ["xae"] = {"Aequian"}, ["xag"] = {"Aghwan"}, ["xai"] = {"Kaimbé"}, ["xaj"] = {"Ararandewára"}, ["xak"] = {"Máku"}, ["xal"] = {"Kalmyk", "Oirat"}, ["xam"] = {"ǀXam"}, ["xan"] = {"Xamtanga"}, ["xao"] = {"Khao"}, ["xap"] = {"Apalachee"}, ["xaq"] = {"Aquitanian"}, ["xar"] = {"Karami"}, ["xas"] = {"Kamas"}, ["xat"] = {"Katawixi"}, ["xau"] = {"Kauwera"}, ["xav"] = {"Xavánte"}, ["xaw"] = {"Kawaiisu"}, ["xay"] = {"Kayan Mahakam"}, ["xbb"] = {"Lower Burdekin"}, ["xbc"] = {"Bactrian"}, ["xbd"] = {"Bindal"}, ["xbe"] = {"Bigambal"}, ["xbg"] = {"Bunganditj"}, ["xbi"] = {"Kombio"}, ["xbj"] = {"Birrpayi"}, ["xbm"] = {"Middle Breton"}, ["xbn"] = {"Kenaboi"}, ["xbo"] = {"Bolgarian"}, ["xbp"] = {"Bibbulman"}, ["xbr"] = {"Kambera"}, ["xbw"] = {"Kambiwá"}, ["xby"] = {"Batjala", "Batyala"}, ["xcb"] = {"Cumbric"}, ["xcc"] = {"Camunic"}, ["xce"] = {"Celtiberian"}, ["xcg"] = {"Cisalpine Gaulish"}, ["xch"] = {"Chemakum", "Chimakum"}, ["xcl"] = {"Classical Armenian"}, ["xcm"] = {"Comecrudo"}, ["xcn"] = {"Cotoname"}, ["xco"] = {"Chorasmian"}, ["xcr"] = {"Carian"}, ["xct"] = {"Classical Tibetan"}, ["xcu"] = {"Curonian"}, ["xcv"] = {"Chuvantsy"}, ["xcw"] = {"Coahuilteco"}, ["xcy"] = {"Cayuse"}, ["xda"] = {"Darkinyung"}, ["xdc"] = {"Dacian"}, ["xdk"] = {"Dharuk"}, ["xdm"] = {"Edomite"}, ["xdo"] = {"Kwandu"}, ["xdq"] = {"Kaitag"}, ["xdy"] = {"Malayic Dayak"}, ["xeb"] = {"Eblan"}, ["xed"] = {"Hdi"}, ["xeg"] = {"ǁXegwi"}, ["xel"] = {"Kelo"}, ["xem"] = {"Kembayan"}, ["xep"] = {"Epi-Olmec"}, ["xer"] = {"Xerénte"}, ["xes"] = {"Kesawai"}, ["xet"] = {"Xetá"}, ["xeu"] = {"Keoru-Ahia"}, ["xfa"] = {"Faliscan"}, ["xga"] = {"Galatian"}, ["xgb"] = {"Gbin"}, ["xgd"] = {"Gudang"}, ["xgf"] = {"Gabrielino-Fernandeño"}, ["xgg"] = {"Goreng"}, ["xgi"] = {"Garingbal"}, ["xgl"] = {"Galindan"}, ["xgm"] = {"Dharumbal", "Guwinmal"}, ["xgn"] = {"Mongolian languages"}, ["xgr"] = {"Garza"}, ["xgu"] = {"Unggumi"}, ["xgw"] = {"Guwa"}, ["xha"] = {"Harami"}, ["xhc"] = {"Hunnic"}, ["xhd"] = {"Hadrami"}, ["xhe"] = {"Khetrani"}, ["xhm"] = {"Middle Khmer (1400 to 1850 CE)"}, ["xhr"] = {"Hernican"}, ["xht"] = {"Hattic"}, ["xhu"] = {"Hurrian"}, ["xhv"] = {"Khua"}, ["xib"] = {"Iberian"}, ["xii"] = {"Xiri"}, ["xil"] = {"Illyrian"}, ["xin"] = {"Xinca"}, ["xir"] = {"Xiriâna"}, ["xis"] = {"Kisan"}, ["xiv"] = {"Indus Valley Language"}, ["xiy"] = {"Xipaya"}, ["xjb"] = {"Minjungbal"}, ["xjt"] = {"Jaitmatang"}, ["xka"] = {"Kalkoti"}, ["xkb"] = {"Northern Nago"}, ["xkc"] = {"Kho'ini"}, ["xkd"] = {"Mendalam Kayan"}, ["xke"] = {"Kereho"}, ["xkf"] = {"Khengkha"}, ["xkg"] = {"Kagoro"}, ["xki"] = {"Kenyan Sign Language"}, ["xkj"] = {"Kajali"}, ["xkk"] = {"Kachok", "Kaco'"}, ["xkl"] = {"Mainstream Kenyah"}, ["xkn"] = {"Kayan River Kayan"}, ["xko"] = {"Kiorr"}, ["xkp"] = {"Kabatei"}, ["xkq"] = {"Koroni"}, ["xkr"] = {"Xakriabá"}, ["xks"] = {"Kumbewaha"}, ["xkt"] = {"Kantosi"}, ["xku"] = {"Kaamba"}, ["xkv"] = {"Kgalagadi"}, ["xkw"] = {"Kembra"}, ["xkx"] = {"Karore"}, ["xky"] = {"Uma' Lasan"}, ["xkz"] = {"Kurtokha"}, ["xla"] = {"Kamula"}, ["xlb"] = {"Loup B"}, ["xlc"] = {"Lycian"}, ["xld"] = {"Lydian"}, ["xle"] = {"Lemnian"}, ["xlg"] = {"Ligurian (Ancient)"}, ["xli"] = {"Liburnian"}, ["xln"] = {"Alanic"}, ["xlo"] = {"Loup A"}, ["xlp"] = {"Lepontic"}, ["xls"] = {"Lusitanian"}, ["xlu"] = {"Cuneiform Luwian"}, ["xly"] = {"Elymian"}, ["xma"] = {"Mushungulu"}, ["xmb"] = {"Mbonga"}, ["xmc"] = {"Makhuwa-Marrevone"}, ["xmd"] = {"Mbudum"}, ["xme"] = {"Median"}, ["xmf"] = {"Mingrelian"}, ["xmg"] = {"Mengaka"}, ["xmh"] = {"Kugu-Muminh"}, ["xmj"] = {"Majera"}, ["xmk"] = {"Ancient Macedonian"}, ["xml"] = {"Malaysian Sign Language"}, ["xmm"] = {"Manado Malay"}, ["xmn"] = {"Manichaean Middle Persian"}, ["xmo"] = {"Morerebi"}, ["xmp"] = {"Kuku-Mu'inh"}, ["xmq"] = {"Kuku-Mangk"}, ["xmr"] = {"Meroitic"}, ["xms"] = {"Moroccan Sign Language"}, ["xmt"] = {"Matbat"}, ["xmu"] = {"Kamu"}, ["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"}, ["xmw"] = {"Tsimihety Malagasy"}, ["xmx"] = {"Salawati", "Maden"}, ["xmy"] = {"Mayaguduna"}, ["xmz"] = {"Mori Bawah"}, ["xna"] = {"Ancient North Arabian"}, ["xnb"] = {"Kanakanabu"}, ["xnd"] = {"Na-Dene languages"}, ["xng"] = {"Middle Mongolian"}, ["xnh"] = {"Kuanhua"}, ["xni"] = {"Ngarigu"}, ["xnj"] = {"Ngoni (Tanzania)"}, ["xnk"] = {"Nganakarti"}, ["xnm"] = {"Ngumbarl"}, ["xnn"] = {"Northern Kankanay"}, ["xno"] = {"Anglo-Norman"}, ["xnq"] = {"Ngoni (Mozambique)"}, ["xnr"] = {"Kangri"}, ["xns"] = {"Kanashi"}, ["xnt"] = {"Narragansett"}, ["xnu"] = {"Nukunul"}, ["xny"] = {"Nyiyaparli"}, ["xnz"] = {"Kenzi", "Mattoki"}, ["xoc"] = {"O'chi'chi'"}, ["xod"] = {"Kokoda"}, ["xog"] = {"Soga"}, ["xoi"] = {"Kominimung"}, ["xok"] = {"Xokleng"}, ["xom"] = {"Komo (Sudan)"}, ["xon"] = {"Konkomba"}, ["xoo"] = {"Xukurú"}, ["xop"] = {"Kopar"}, ["xor"] = {"Korubo"}, ["xow"] = {"Kowaki"}, ["xpa"] = {"Pirriya"}, ["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"}, ["xpc"] = {"Pecheneg"}, ["xpd"] = {"Oyster Bay Tasmanian"}, ["xpe"] = {"Liberia Kpelle"}, ["xpf"] = {"Southeast Tasmanian", "Nuenonne"}, ["xpg"] = {"Phrygian"}, ["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"}, ["xpi"] = {"Pictish"}, ["xpj"] = {"Mpalitjanh"}, ["xpk"] = {"Kulina Pano"}, ["xpl"] = {"Port Sorell Tasmanian"}, ["xpm"] = {"Pumpokol"}, ["xpn"] = {"Kapinawá"}, ["xpo"] = {"Pochutec"}, ["xpp"] = {"Puyo-Paekche"}, ["xpq"] = {"Mohegan-Pequot"}, ["xpr"] = {"Parthian"}, ["xps"] = {"Pisidian"}, ["xpt"] = {"Punthamara"}, ["xpu"] = {"Punic"}, ["xpv"] = {"Northern Tasmanian", "Tommeginne"}, ["xpw"] = {"Northwestern Tasmanian", "Peerapper"}, ["xpx"] = {"Southwestern Tasmanian", "Toogee"}, ["xpy"] = {"Puyo"}, ["xpz"] = {"Bruny Island Tasmanian"}, ["xqa"] = {"Karakhanid"}, ["xqt"] = {"Qatabanian"}, ["xra"] = {"Krahô"}, ["xrb"] = {"Eastern Karaboro"}, ["xrd"] = {"Gundungurra"}, ["xre"] = {"Kreye"}, ["xrg"] = {"Minang"}, ["xri"] = {"Krikati-Timbira"}, ["xrm"] = {"Armazic"}, ["xrn"] = {"Arin"}, ["xrr"] = {"Raetic"}, ["xrt"] = {"Aranama-Tamique"}, ["xru"] = {"Marriammu"}, ["xrw"] = {"Karawa"}, ["xsa"] = {"Sabaean"}, ["xsb"] = {"Sambal"}, ["xsc"] = {"Scythian"}, ["xsd"] = {"Sidetic"}, ["xse"] = {"Sempan"}, ["xsh"] = {"Shamang"}, ["xsi"] = {"Sio"}, ["xsj"] = {"Subi"}, ["xsl"] = {"South Slavey"}, ["xsm"] = {"Kasem"}, ["xsn"] = {"Sanga (Nigeria)"}, ["xso"] = {"Solano"}, ["xsp"] = {"Silopi"}, ["xsq"] = {"Makhuwa-Saka"}, ["xsr"] = {"Sherpa"}, ["xsu"] = {"Sanumá"}, ["xsv"] = {"Sudovian"}, ["xsy"] = {"Saisiyat"}, ["xta"] = {"Alcozauca Mixtec"}, ["xtb"] = {"Chazumba Mixtec"}, ["xtc"] = {"Katcha-Kadugli-Miri"}, ["xtd"] = {"Diuxi-Tilantongo Mixtec"}, ["xte"] = {"Ketengban"}, ["xtg"] = {"Transalpine Gaulish"}, ["xth"] = {"Yitha Yitha"}, ["xti"] = {"Sinicahua Mixtec"}, ["xtj"] = {"San Juan Teita Mixtec"}, ["xtl"] = {"Tijaltepec Mixtec"}, ["xtm"] = {"Magdalena Peñasco Mixtec"}, ["xtn"] = {"Northern Tlaxiaco Mixtec"}, ["xto"] = {"Tokharian A"}, ["xtp"] = {"San Miguel Piedras Mixtec"}, ["xtq"] = {"Tumshuqese"}, ["xtr"] = {"Early Tripuri"}, ["xts"] = {"Sindihui Mixtec"}, ["xtt"] = {"Tacahua Mixtec"}, ["xtu"] = {"Cuyamecalco Mixtec"}, ["xtv"] = {"Thawa"}, ["xtw"] = {"Tawandê"}, ["xty"] = {"Yoloxochitl Mixtec"}, ["xua"] = {"Alu Kurumba"}, ["xub"] = {"Betta Kurumba"}, ["xud"] = {"Umiida"}, ["xug"] = {"Kunigami"}, ["xuj"] = {"Jennu Kurumba"}, ["xul"] = {"Ngunawal", "Nunukul"}, ["xum"] = {"Umbrian"}, ["xun"] = {"Unggaranggu"}, ["xuo"] = {"Kuo"}, ["xup"] = {"Upper Umpqua"}, ["xur"] = {"Urartian"}, ["xut"] = {"Kuthant"}, ["xuu"] = {"Kxoe", "Khwedam"}, ["xve"] = {"Venetic"}, ["xvi"] = {"Kamviri"}, ["xvn"] = {"Vandalic"}, ["xvo"] = {"Volscian"}, ["xvs"] = {"Vestinian"}, ["xwa"] = {"Kwaza"}, ["xwc"] = {"Woccon"}, ["xwd"] = {"Wadi Wadi"}, ["xwe"] = {"Xwela Gbe"}, ["xwg"] = {"Kwegu"}, ["xwj"] = {"Wajuk"}, ["xwk"] = {"Wangkumara"}, ["xwl"] = {"Western Xwla Gbe"}, ["xwo"] = {"Written Oirat"}, ["xwr"] = {"Kwerba Mamberamo"}, ["xwt"] = {"Wotjobaluk"}, ["xww"] = {"Wemba Wemba"}, ["xxb"] = {"Boro (Ghana)"}, ["xxk"] = {"Ke'o"}, ["xxm"] = {"Minkin"}, ["xxr"] = {"Koropó"}, ["xxt"] = {"Tambora"}, ["xya"] = {"Yaygir"}, ["xyb"] = {"Yandjibara"}, ["xyj"] = {"Mayi-Yapi"}, ["xyk"] = {"Mayi-Kulan"}, ["xyl"] = {"Yalakalore"}, ["xyt"] = {"Mayi-Thakurti"}, ["xyy"] = {"Yorta Yorta"}, ["xzh"] = {"Zhang-Zhung"}, ["xzm"] = {"Zemgalian"}, ["xzp"] = {"Ancient Zapotec"}, ["yaa"] = {"Yaminahua"}, ["yab"] = {"Yuhup"}, ["yac"] = {"Pass Valley Yali"}, ["yad"] = {"Yagua"}, ["yae"] = {"Pumé"}, ["yaf"] = {"Yaka (Democratic Republic of Congo)"}, ["yag"] = {"Yámana"}, ["yah"] = {"Yazgulyam"}, ["yai"] = {"Yagnobi"}, ["yaj"] = {"Banda-Yangere"}, ["yak"] = {"Yakama"}, ["yal"] = {"Yalunka"}, ["yam"] = {"Yamba"}, ["yan"] = {"Mayangna"}, ["yao"] = {"Yao"}, ["yap"] = {"Yapese"}, ["yaq"] = {"Yaqui"}, ["yar"] = {"Yabarana"}, ["yas"] = {"Nugunu (Cameroon)"}, ["yat"] = {"Yambeta"}, ["yau"] = {"Yuwana"}, ["yav"] = {"Yangben"}, ["yaw"] = {"Yawalapití"}, ["yax"] = {"Yauma"}, ["yay"] = {"Agwagwune"}, ["yaz"] = {"Lokaa"}, ["yba"] = {"Yala"}, ["ybb"] = {"Yemba"}, ["ybe"] = {"West Yugur"}, ["ybh"] = {"Yakha"}, ["ybi"] = {"Yamphu"}, ["ybj"] = {"Hasha"}, ["ybk"] = {"Bokha"}, ["ybl"] = {"Yukuben"}, ["ybm"] = {"Yaben"}, ["ybn"] = {"Yabaâna"}, ["ybo"] = {"Yabong"}, ["ybx"] = {"Yawiyo"}, ["yby"] = {"Yaweyuha"}, ["ych"] = {"Chesu"}, ["ycl"] = {"Lolopo"}, ["ycn"] = {"Yucuna"}, ["ycp"] = {"Chepya"}, ["ycr"] = {"Yilan Creole"}, ["yda"] = {"Yanda"}, ["ydd"] = {"Eastern Yiddish"}, ["yde"] = {"Yangum Dey"}, ["ydg"] = {"Yidgha"}, ["ydk"] = {"Yoidik"}, ["yea"] = {"Ravula"}, ["yec"] = {"Yeniche"}, ["yee"] = {"Yimas"}, ["yei"] = {"Yeni"}, ["yej"] = {"Yevanic"}, ["yel"] = {"Yela"}, ["yer"] = {"Tarok"}, ["yes"] = {"Nyankpa"}, ["yet"] = {"Yetfa"}, ["yeu"] = {"Yerukula"}, ["yev"] = {"Yapunda"}, ["yey"] = {"Yeyi"}, ["yga"] = {"Malyangapa"}, ["ygi"] = {"Yiningayi"}, ["ygl"] = {"Yangum Gel"}, ["ygm"] = {"Yagomi"}, ["ygp"] = {"Gepo"}, ["ygr"] = {"Yagaria"}, ["ygs"] = {"Yolŋu Sign Language"}, ["ygu"] = {"Yugul"}, ["ygw"] = {"Yagwoia"}, ["yha"] = {"Baha Buyang"}, ["yhd"] = {"Judeo-Iraqi Arabic"}, ["yhl"] = {"Hlepho Phowa"}, ["yhs"] = {"Yan-nhaŋu Sign Language"}, ["yia"] = {"Yinggarda"}, ["yif"] = {"Ache"}, ["yig"] = {"Wusa Nasu"}, ["yih"] = {"Western Yiddish"}, ["yii"] = {"Yidiny"}, ["yij"] = {"Yindjibarndi"}, ["yik"] = {"Dongshanba Lalo"}, ["yil"] = {"Yindjilandji"}, ["yim"] = {"Yimchungru Naga"}, ["yin"] = {"Riang Lai", "Yinchia"}, ["yip"] = {"Pholo"}, ["yiq"] = {"Miqie"}, ["yir"] = {"North Awyu"}, ["yis"] = {"Yis"}, ["yit"] = {"Eastern Lalu"}, ["yiu"] = {"Awu"}, ["yiv"] = {"Northern Nisu"}, ["yix"] = {"Axi Yi"}, ["yiz"] = {"Azhe"}, ["yka"] = {"Yakan"}, ["ykg"] = {"Northern Yukaghir"}, ["ykh"] = {"Khamnigan Mongol"}, ["yki"] = {"Yoke"}, ["ykk"] = {"Yakaikeke"}, ["ykl"] = {"Khlula"}, ["ykm"] = {"Kap"}, ["ykn"] = {"Kua-nsi"}, ["yko"] = {"Yasa"}, ["ykr"] = {"Yekora"}, ["ykt"] = {"Kathu"}, ["yku"] = {"Kuamasi"}, ["yky"] = {"Yakoma"}, ["yla"] = {"Yaul"}, ["ylb"] = {"Yaleba"}, ["yle"] = {"Yele"}, ["ylg"] = {"Yelogu"}, ["yli"] = {"Angguruk Yali"}, ["yll"] = {"Yil"}, ["ylm"] = {"Limi"}, ["yln"] = {"Langnian Buyang"}, ["ylo"] = {"Naluo Yi"}, ["ylr"] = {"Yalarnnga"}, ["ylu"] = {"Aribwaung"}, ["yly"] = {"Nyâlayu", "Nyelâyu"}, ["ymb"] = {"Yambes"}, ["ymc"] = {"Southern Muji"}, ["ymd"] = {"Muda"}, ["yme"] = {"Yameo"}, ["ymg"] = {"Yamongeri"}, ["ymh"] = {"Mili"}, ["ymi"] = {"Moji"}, ["ymk"] = {"Makwe"}, ["yml"] = {"Iamalele"}, ["ymm"] = {"Maay"}, ["ymn"] = {"Yamna", "Sunum"}, ["ymo"] = {"Yangum Mon"}, ["ymp"] = {"Yamap"}, ["ymq"] = {"Qila Muji"}, ["ymr"] = {"Malasar"}, ["yms"] = {"Mysian"}, ["ymx"] = {"Northern Muji"}, ["ymz"] = {"Muzi"}, ["yna"] = {"Aluo"}, ["ynd"] = {"Yandruwandha"}, ["yne"] = {"Lang'e"}, ["yng"] = {"Yango"}, ["ynk"] = {"Naukan Yupik"}, ["ynl"] = {"Yangulam"}, ["ynn"] = {"Yana"}, ["yno"] = {"Yong"}, ["ynq"] = {"Yendang"}, ["yns"] = {"Yansi"}, ["ynu"] = {"Yahuna"}, ["yob"] = {"Yoba"}, ["yog"] = {"Yogad"}, ["yoi"] = {"Yonaguni"}, ["yok"] = {"Yokuts"}, ["yol"] = {"Yola"}, ["yom"] = {"Yombe"}, ["yon"] = {"Yongkom"}, ["yot"] = {"Yotti"}, ["yox"] = {"Yoron"}, ["yoy"] = {"Yoy"}, ["ypa"] = {"Phala"}, ["ypb"] = {"Labo Phowa"}, ["ypg"] = {"Phola"}, ["yph"] = {"Phupha"}, ["ypk"] = {"Yupik languages"}, ["ypm"] = {"Phuma"}, ["ypn"] = {"Ani Phowa"}, ["ypo"] = {"Alo Phola"}, ["ypp"] = {"Phupa"}, ["ypz"] = {"Phuza"}, ["yra"] = {"Yerakai"}, ["yrb"] = {"Yareba"}, ["yre"] = {"Yaouré"}, ["yrk"] = {"Nenets"}, ["yrl"] = {"Nhengatu"}, ["yrm"] = {"Yirrk-Mel"}, ["yrn"] = {"Yerong"}, ["yro"] = {"Yaroamë"}, ["yrs"] = {"Yarsun"}, ["yrw"] = {"Yarawata"}, ["yry"] = {"Yarluyandi"}, ["ysc"] = {"Yassic"}, ["ysd"] = {"Samatao"}, ["ysg"] = {"Sonaga"}, ["ysl"] = {"Yugoslavian Sign Language"}, ["ysm"] = {"Myanmar Sign Language"}, ["ysn"] = {"Sani"}, ["yso"] = {"Nisi (China)"}, ["ysp"] = {"Southern Lolopo"}, ["ysr"] = {"Sirenik Yupik"}, ["yss"] = {"Yessan-Mayo"}, ["ysy"] = {"Sanie"}, ["yta"] = {"Talu"}, ["ytl"] = {"Tanglang"}, ["ytp"] = {"Thopho"}, ["ytw"] = {"Yout Wam"}, ["yty"] = {"Yatay"}, ["yua"] = {"Yucateco", "Yucatec Maya"}, ["yub"] = {"Yugambal"}, ["yuc"] = {"Yuchi"}, ["yud"] = {"Judeo-Tripolitanian Arabic"}, ["yue"] = {"Yue Chinese", "Cantonese"}, ["yuf"] = {"Havasupai-Walapai-Yavapai"}, ["yug"] = {"Yug"}, ["yui"] = {"Yurutí"}, ["yuj"] = {"Karkar-Yuri"}, ["yuk"] = {"Yuki"}, ["yul"] = {"Yulu"}, ["yum"] = {"Quechan"}, ["yun"] = {"Bena (Nigeria)"}, ["yup"] = {"Yukpa"}, ["yuq"] = {"Yuqui"}, ["yur"] = {"Yurok"}, ["yut"] = {"Yopno"}, ["yuw"] = {"Yau (Morobe Province)"}, ["yux"] = {"Southern Yukaghir"}, ["yuy"] = {"East Yugur"}, ["yuz"] = {"Yuracare"}, ["yva"] = {"Yawa"}, ["yvt"] = {"Yavitero"}, ["ywa"] = {"Kalou"}, ["ywg"] = {"Yinhawangka"}, ["ywl"] = {"Western Lalu"}, ["ywn"] = {"Yawanawa"}, ["ywq"] = {"Wuding-Luquan Yi"}, ["ywr"] = {"Yawuru"}, ["ywt"] = {"Xishanba Lalo", "Central Lalo"}, ["ywu"] = {"Wumeng Nasu"}, ["yww"] = {"Yawarawarga"}, ["yxa"] = {"Mayawali"}, ["yxg"] = {"Yagara"}, ["yxl"] = {"Yardliyawarra"}, ["yxm"] = {"Yinwum"}, ["yxu"] = {"Yuyu"}, ["yxy"] = {"Yabula Yabula"}, ["yyr"] = {"Yir Yoront"}, ["yyu"] = {"Yau (Sandaun Province)"}, ["yyz"] = {"Ayizi"}, ["yzg"] = {"E'ma Buyang"}, ["yzk"] = {"Zokhuo"}, ["zaa"] = {"Sierra de Juárez Zapotec"}, ["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"}, ["zac"] = {"Ocotlán Zapotec"}, ["zad"] = {"Cajonos Zapotec"}, ["zae"] = {"Yareni Zapotec"}, ["zaf"] = {"Ayoquesco Zapotec"}, ["zag"] = {"Zaghawa"}, ["zah"] = {"Zangwal"}, ["zai"] = {"Isthmus Zapotec"}, ["zaj"] = {"Zaramo"}, ["zak"] = {"Zanaki"}, ["zal"] = {"Zauzou"}, ["zam"] = {"Miahuatlán Zapotec"}, ["zao"] = {"Ozolotepec Zapotec"}, ["zap"] = {"Zapotec"}, ["zaq"] = {"Aloápam Zapotec"}, ["zar"] = {"Rincón Zapotec"}, ["zas"] = {"Santo Domingo Albarradas Zapotec"}, ["zat"] = {"Tabaa Zapotec"}, ["zau"] = {"Zangskari"}, ["zav"] = {"Yatzachi Zapotec"}, ["zaw"] = {"Mitla Zapotec"}, ["zax"] = {"Xadani Zapotec"}, ["zay"] = {"Zayse-Zergulla", "Zaysete"}, ["zaz"] = {"Zari"}, ["zba"] = {"Balaibalan"}, ["zbc"] = {"Central Berawan"}, ["zbe"] = {"East Berawan"}, ["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"}, ["zbt"] = {"Batui"}, ["zbu"] = {"Bu (Bauchi State)"}, ["zbw"] = {"West Berawan"}, ["zca"] = {"Coatecas Altas Zapotec"}, ["zcd"] = {"Las Delicias Zapotec"}, ["zch"] = {"Central Hongshuihe Zhuang"}, ["zdj"] = {"Ngazidja Comorian"}, ["zea"] = {"Zeeuws"}, ["zeg"] = {"Zenag"}, ["zeh"] = {"Eastern Hongshuihe Zhuang"}, ["zem"] = {"Zeem"}, ["zen"] = {"Zenaga"}, ["zga"] = {"Kinga"}, ["zgb"] = {"Guibei Zhuang"}, ["zgh"] = {"Standard Moroccan Tamazight"}, ["zgm"] = {"Minz Zhuang"}, ["zgn"] = {"Guibian Zhuang"}, ["zgr"] = {"Magori"}, ["zhb"] = {"Zhaba"}, ["zhd"] = {"Dai Zhuang"}, ["zhi"] = {"Zhire"}, ["zhn"] = {"Nong Zhuang"}, ["zhw"] = {"Zhoa"}, ["zhx"] = {"Chinese (family)"}, ["zia"] = {"Zia"}, ["zib"] = {"Zimbabwe Sign Language"}, ["zik"] = {"Zimakani"}, ["zil"] = {"Zialo"}, ["zim"] = {"Mesme"}, ["zin"] = {"Zinza"}, ["ziw"] = {"Zigula"}, ["ziz"] = {"Zizilivakan"}, ["zka"] = {"Kaimbulawa"}, ["zkd"] = {"Kadu"}, ["zkg"] = {"Koguryo"}, ["zkh"] = {"Khorezmian"}, ["zkk"] = {"Karankawa"}, ["zkn"] = {"Kanan"}, ["zko"] = {"Kott"}, ["zkp"] = {"São Paulo Kaingáng"}, ["zkr"] = {"Zakhring"}, ["zkt"] = {"Kitan"}, ["zku"] = {"Kaurna"}, ["zkv"] = {"Krevinian"}, ["zkz"] = {"Khazar"}, ["zla"] = {"Zula"}, ["zle"] = {"East Slavic languages"}, ["zlj"] = {"Liujiang Zhuang"}, ["zlm"] = {"Malay (individual language)"}, ["zln"] = {"Lianshan Zhuang"}, ["zlq"] = {"Liuqian Zhuang"}, ["zls"] = {"South Slavic languages"}, ["zlu"] = {"Zul"}, ["zlw"] = {"West Slavic languages"}, ["zma"] = {"Manda (Australia)"}, ["zmb"] = {"Zimba"}, ["zmc"] = {"Margany"}, ["zmd"] = {"Maridan"}, ["zme"] = {"Mangerr"}, ["zmf"] = {"Mfinu"}, ["zmg"] = {"Marti Ke"}, ["zmh"] = {"Makolkol"}, ["zmi"] = {"Negeri Sembilan Malay"}, ["zmj"] = {"Maridjabin"}, ["zmk"] = {"Mandandanyi"}, ["zml"] = {"Matngala"}, ["zmm"] = {"Marimanindji", "Marramaninyshi"}, ["zmn"] = {"Mbangwe"}, ["zmo"] = {"Molo"}, ["zmp"] = {"Mpuono"}, ["zmq"] = {"Mituku"}, ["zmr"] = {"Maranunggu"}, ["zms"] = {"Mbesa"}, ["zmt"] = {"Maringarr"}, ["zmu"] = {"Muruwari"}, ["zmv"] = {"Mbariman-Gudhinma"}, ["zmw"] = {"Mbo (Democratic Republic of Congo)"}, ["zmx"] = {"Bomitaba"}, ["zmy"] = {"Mariyedi"}, ["zmz"] = {"Mbandja"}, ["zna"] = {"Zan Gula"}, ["znd"] = {"Zande languages"}, ["zne"] = {"Zande (individual language)"}, ["zng"] = {"Mang"}, ["znk"] = {"Manangkari"}, ["zns"] = {"Mangas"}, ["zoc"] = {"Copainalá Zoque"}, ["zoh"] = {"Chimalapa Zoque"}, ["zom"] = {"Zou"}, ["zoo"] = {"Asunción Mixtepec Zapotec"}, ["zoq"] = {"Tabasco Zoque"}, ["zor"] = {"Rayón Zoque"}, ["zos"] = {"Francisco León Zoque"}, ["zpa"] = {"Lachiguiri Zapotec"}, ["zpb"] = {"Yautepec Zapotec"}, ["zpc"] = {"Choapan Zapotec"}, ["zpd"] = {"Southeastern Ixtlán Zapotec"}, ["zpe"] = {"Petapa Zapotec"}, ["zpf"] = {"San Pedro Quiatoni Zapotec"}, ["zpg"] = {"Guevea De Humboldt Zapotec"}, ["zph"] = {"Totomachapan Zapotec"}, ["zpi"] = {"Santa María Quiegolani Zapotec"}, ["zpj"] = {"Quiavicuzas Zapotec"}, ["zpk"] = {"Tlacolulita Zapotec"}, ["zpl"] = {"Lachixío Zapotec"}, ["zpm"] = {"Mixtepec Zapotec"}, ["zpn"] = {"Santa Inés Yatzechi Zapotec"}, ["zpo"] = {"Amatlán Zapotec"}, ["zpp"] = {"El Alto Zapotec"}, ["zpq"] = {"Zoogocho Zapotec"}, ["zpr"] = {"Santiago Xanica Zapotec"}, ["zps"] = {"Coatlán Zapotec"}, ["zpt"] = {"San Vicente Coatlán Zapotec"}, ["zpu"] = {"Yalálag Zapotec"}, ["zpv"] = {"Chichicapan Zapotec"}, ["zpw"] = {"Zaniza Zapotec"}, ["zpx"] = {"San Baltazar Loxicha Zapotec"}, ["zpy"] = {"Mazaltepec Zapotec"}, ["zpz"] = {"Texmelucan Zapotec"}, ["zqe"] = {"Qiubei Zhuang"}, ["zra"] = {"Kara (Korea)"}, ["zrg"] = {"Mirgan"}, ["zrn"] = {"Zerenkel"}, ["zro"] = {"Záparo"}, ["zrp"] = {"Zarphatic"}, ["zrs"] = {"Mairasi"}, ["zsa"] = {"Sarasira"}, ["zsk"] = {"Kaskean"}, ["zsl"] = {"Zambian Sign Language"}, ["zsm"] = {"Standard Malay"}, ["zsr"] = {"Southern Rincon Zapotec"}, ["zsu"] = {"Sukurum"}, ["zte"] = {"Elotepec Zapotec"}, ["ztg"] = {"Xanaguía Zapotec"}, ["ztl"] = {"Lapaguía-Guivini Zapotec"}, ["ztm"] = {"San Agustín Mixtepec Zapotec"}, ["ztn"] = {"Santa Catarina Albarradas Zapotec"}, ["ztp"] = {"Loxicha Zapotec"}, ["ztq"] = {"Quioquitani-Quierí Zapotec"}, ["zts"] = {"Tilquiapan Zapotec"}, ["ztt"] = {"Tejalapan Zapotec"}, ["ztu"] = {"Güilá Zapotec"}, ["ztx"] = {"Zaachila Zapotec"}, ["zty"] = {"Yatee Zapotec"}, ["zuh"] = {"Tokano"}, ["zum"] = {"Kumzari"}, ["zun"] = {"Zuni"}, ["zuy"] = {"Zumaya"}, ["zwa"] = {"Zay"}, ["zxx"] = {"No linguistic content", "Not applicable"}, ["zyb"] = {"Yongbei Zhuang"}, ["zyg"] = {"Yang Zhuang"}, ["zyj"] = {"Youjiang Zhuang"}, ["zyn"] = {"Yongnan Zhuang"}, ["zyp"] = {"Zyphe Chin"}, ["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"}, ["zzj"] = {"Zuojiang Zhuang"} } local deprecated = { ["in"] = {"Indonesian"}, ["iw"] = {"Hebrew"}, ["ji"] = {"Yiddish"}, ["jw"] = {"Javanese"}, ["mo"] = {"Moldavian", "Moldovan"}, ["aam"] = {"Aramanik"}, ["adp"] = {"Adap"}, ["agp"] = {"Paranan"}, ["ais"] = {"Nataoran Amis"}, ["ajp"] = {"South Levantine Arabic"}, ["ajt"] = {"Judeo-Tunisian Arabic"}, ["aoh"] = {"Arma"}, ["asd"] = {"Asas"}, ["aue"] = {"ǂKxʼauǁʼein"}, ["ayx"] = {"Ayi (China)"}, ["ayy"] = {"Tayabas Ayta"}, ["baz"] = {"Tunen"}, ["bbz"] = {"Babalia Creole Arabic"}, ["bgm"] = {"Baga Mboteni"}, ["bhk"] = {"Albay Bicolano"}, ["bic"] = {"Bikaru"}, ["bij"] = {"Vaghat-Ya-Bijim-Legeri"}, ["bjd"] = {"Bandjigali"}, ["bjq"] = {"Southern Betsimisaraka Malagasy"}, ["bkb"] = {"Finallig"}, ["blg"] = {"Balau"}, ["bmy"] = {"Bemba (Democratic Republic of Congo)"}, ["bpb"] = {"Barbacoas"}, ["btb"] = {"Beti (Cameroon)"}, ["btl"] = {"Bhatola"}, ["bxx"] = {"Borna (Democratic Republic of Congo)"}, ["byy"] = {"Buya"}, ["cbe"] = {"Chipiajes"}, ["cbh"] = {"Cagua"}, ["cca"] = {"Cauca"}, ["ccq"] = {"Chaungtha"}, ["cdg"] = {"Chamari"}, ["cjr"] = {"Chorotega"}, ["cka"] = {"Khumi Awa Chin"}, ["cmk"] = {"Chimakum"}, ["coy"] = {"Coyaima"}, ["cqu"] = {"Chilean Quechua"}, ["cug"] = {"Chungmboko", "Cung"}, ["cum"] = {"Cumeral"}, ["daf"] = {"Dan"}, ["dap"] = {"Nisi (India)"}, ["dgu"] = {"Degaru"}, ["dha"] = {"Dhanwar (India)"}, ["dit"] = {"Dirari"}, ["djl"] = {"Djiwarli"}, ["dkl"] = {"Kolum So Dogon"}, ["drh"] = {"Darkhat"}, ["drr"] = {"Dororo"}, ["drw"] = {"Darwazi"}, ["dud"] = {"Hun-Saare"}, ["duj"] = {"Dhuwal"}, ["dwl"] = {"Walo Kumbe Dogon"}, ["ekc"] = {"Eastern Karnic"}, ["elp"] = {"Elpaputih"}, ["emo"] = {"Emok"}, ["gav"] = {"Gabutamon"}, ["gbc"] = {"Garawa"}, ["gfx"] = {"Mangetti Dune ǃXung"}, ["ggn"] = {"Eastern Gurung"}, ["ggo"] = {"Southern Gondi"}, ["ggr"] = {"Aghu Tharnggalu"}, ["gio"] = {"Gelao"}, ["gji"] = {"Geji"}, ["gli"] = {"Guliguli"}, ["gti"] = {"Gbati-ri"}, ["guv"] = {"Gey"}, ["hrr"] = {"Horuru"}, ["iap"] = {"Iapama"}, ["ibi"] = {"Ibilo"}, ["ill"] = {"Iranun"}, ["ilw"] = {"Talur"}, ["ime"] = {"Imeraguen"}, ["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"}, ["jar"] = {"Jarawa (Nigeria)"}, ["jeg"] = {"Jeng"}, ["kbf"] = {"Kakauhua"}, ["kdv"] = {"Kado"}, ["kgc"] = {"Kasseng"}, ["kgd"] = {"Kataang"}, ["kgh"] = {"Upper Tanudan Kalinga"}, ["kgm"] = {"Karipúna"}, ["kjf"] = {"Khalaj [Indo-Iranian]"}, ["koj"] = {"Sara Dunjo"}, ["kox"] = {"Coxima"}, ["kpp"] = {"Paku Karen"}, ["krm"] = {"Krim"}, ["ksa"] = {"Shuwa-Zamani"}, ["ktr"] = {"Kota Marudu Tinagas"}, ["kvs"] = {"Kunggara"}, ["kwq"] = {"Kwak"}, ["kxe"] = {"Kakihum"}, ["kxl"] = {"Nepali Kurux"}, ["kxu"] = {"Kui (India)"}, ["kzh"] = {"Kenuzi-Dongola"}, ["kzj"] = {"Coastal Kadazan"}, ["kzt"] = {"Tambunan Dusun"}, ["lak"] = {"Laka (Nigeria)"}, ["lba"] = {"Lui"}, ["leg"] = {"Lengua"}, ["lii"] = {"Lingkhim"}, ["llo"] = {"Khlor"}, ["lmm"] = {"Lamam"}, ["lmz"] = {"Lumbee"}, ["lno"] = {"Lango (South Sudan)"}, ["lsg"] = {"Lyons Sign Language"}, ["meg"] = {"Mea"}, ["mgx"] = {"Omati"}, ["mhh"] = {"Maskoy Pidgin"}, ["mja"] = {"Mahei"}, ["mld"] = {"Malakhel"}, ["mnt"] = {"Maykulan"}, ["mof"] = {"Mohegan-Montauk-Narragansett"}, ["mst"] = {"Cataelano Mandaya"}, ["mvm"] = {"Muya"}, ["mwd"] = {"Mudbura"}, ["mwj"] = {"Maligo"}, ["mwx"] = {"Mediak"}, ["mwy"] = {"Mosiro"}, ["myd"] = {"Maramba"}, ["myi"] = {"Mina (India)"}, ["myq"] = {"Forest Maninka"}, ["myt"] = {"Sangab Mandaya"}, ["nad"] = {"Nijadali"}, ["nbf"] = {"Naxi"}, ["nbx"] = {"Ngura"}, ["ncp"] = {"Ndaktup"}, ["ngo"] = {"Ngoni"}, ["nln"] = {"Durango Nahuatl"}, ["nlr"] = {"Ngarla"}, ["nns"] = {"Ningye"}, ["nnx"] = {"Ngong"}, ["nom"] = {"Nocamán"}, ["noo"] = {"Nootka"}, ["nts"] = {"Natagaimas"}, ["nxu"] = {"Narau"}, ["ome"] = {"Omejes"}, ["oun"] = {"ǃOǃung"}, ["pat"] = {"Papitalai"}, ["pbz"] = {"Palu"}, ["pcr"] = {"Panang"}, ["pgy"] = {"Pongyong"}, ["pii"] = {"Pini"}, ["plj"] = {"Polci"}, ["plp"] = {"Palpa"}, ["pmc"] = {"Palumata"}, ["pmk"] = {"Pamlico"}, ["pmu"] = {"Mirpur Panjabi"}, ["pod"] = {"Ponares"}, ["ppa"] = {"Pao"}, ["ppr"] = {"Piru"}, ["prb"] = {"Lua'"}, ["prp"] = {"Parsi"}, ["pry"] = {"Pray 3"}, ["puk"] = {"Pu Ko"}, ["puz"] = {"Purum Naga"}, ["rie"] = {"Rien"}, ["rmr"] = {"Caló"}, ["rna"] = {"Runa"}, ["rsi"] = {"Rennellese Sign Language"}, ["sap"] = {"Sanapaná"}, ["sca"] = {"Sansu"}, ["sdm"] = {"Semandang"}, ["sgl"] = {"Sanglechi-Ishkashimi"}, ["sgo"] = {"Songa"}, ["skk"] = {"Sok"}, ["slq"] = {"Salchuq"}, ["smd"] = {"Sama"}, ["snb"] = {"Sebuyau"}, ["snh"] = {"Shinabo"}, ["sul"] = {"Surigaonon"}, ["sum"] = {"Sumo-Mayangna"}, ["svr"] = {"Savara"}, ["szd"] = {"Seru"}, ["tbb"] = {"Tapeba"}, ["tdu"] = {"Tempasuk Dusun"}, ["tgg"] = {"Tangga"}, ["thc"] = {"Tai Hang Tong"}, ["thw"] = {"Thudam"}, ["thx"] = {"The"}, ["tid"] = {"Tidong"}, ["tie"] = {"Tingal"}, ["tkk"] = {"Takpa"}, ["tlw"] = {"South Wemale"}, ["tmk"] = {"Northwestern Tamang"}, ["tmp"] = {"Tai Mène"}, ["tne"] = {"Tinoc Kallahan"}, ["tnf"] = {"Tangshewi"}, ["toe"] = {"Tomedes"}, ["tpw"] = {"Tupí"}, ["tsf"] = {"Southwestern Tamang"}, ["unp"] = {"Worora"}, ["uok"] = {"Uokha"}, ["uun"] = {"Kulon-Pazeh"}, ["vki"] = {"Ija-Zuba"}, ["wgw"] = {"Wagawaga"}, ["wit"] = {"Wintu"}, ["wiw"] = {"Wirangu"}, ["wra"] = {"Warapu"}, ["wrd"] = {"Warduji"}, ["wya"] = {"Wyandot"}, ["xba"] = {"Kamba (Brazil)"}, ["xbx"] = {"Kabixí"}, ["xia"] = {"Xiandao"}, ["xip"] = {"Xipináwa"}, ["xkh"] = {"Karahawyana"}, ["xrq"] = {"Karranga"}, ["xss"] = {"Assan"}, ["xtz"] = {"Tasmanian"}, ["ybd"] = {"Yangbye"}, ["yds"] = {"Yiddish Sign Language"}, ["yen"] = {"Yendang"}, ["yiy"] = {"Yir Yoront"}, ["yma"] = {"Yamphe"}, ["ymt"] = {"Mator-Taygi-Karagas"}, ["ynh"] = {"Yangho"}, ["yos"] = {"Yos"}, ["yri"] = {"Yarí"}, ["yuu"] = {"Yugh"}, ["zir"] = {"Ziriya"}, ["zkb"] = {"Koibal"}, ["zua"] = {"Zeem"} } return { active = active, deprecated = deprecated, } 7e8fcbc627dace0b48345e47103fa5243cc7add3 Module:Language/data/iana scripts 828 96 266 265 2024-02-07T02:44:09Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Language/data/iana_scripts]] Scribunto text/plain -- File-Date: 2023-10-16 return { ["Adlm"] = {"Adlam"}, ["Afak"] = {"Afaka"}, ["Aghb"] = {"Caucasian Albanian"}, ["Ahom"] = {"Ahom", "Tai Ahom"}, ["Arab"] = {"Arabic"}, ["Aran"] = {"Arabic (Nastaliq variant)"}, ["Armi"] = {"Imperial Aramaic"}, ["Armn"] = {"Armenian"}, ["Avst"] = {"Avestan"}, ["Bali"] = {"Balinese"}, ["Bamu"] = {"Bamum"}, ["Bass"] = {"Bassa Vah"}, ["Batk"] = {"Batak"}, ["Beng"] = {"Bengali", "Bangla"}, ["Bhks"] = {"Bhaiksuki"}, ["Blis"] = {"Blissymbols"}, ["Bopo"] = {"Bopomofo"}, ["Brah"] = {"Brahmi"}, ["Brai"] = {"Braille"}, ["Bugi"] = {"Buginese"}, ["Buhd"] = {"Buhid"}, ["Cakm"] = {"Chakma"}, ["Cans"] = {"Unified Canadian Aboriginal Syllabics"}, ["Cari"] = {"Carian"}, ["Cham"] = {"Cham"}, ["Cher"] = {"Cherokee"}, ["Chis"] = {"Chisoi"}, ["Chrs"] = {"Chorasmian"}, ["Cirt"] = {"Cirth"}, ["Copt"] = {"Coptic"}, ["Cpmn"] = {"Cypro-Minoan"}, ["Cprt"] = {"Cypriot syllabary"}, ["Cyrl"] = {"Cyrillic"}, ["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"}, ["Deva"] = {"Devanagari", "Nagari"}, ["Diak"] = {"Dives Akuru"}, ["Dogr"] = {"Dogra"}, ["Dsrt"] = {"Deseret", "Mormon"}, ["Dupl"] = {"Duployan shorthand", "Duployan stenography"}, ["Egyd"] = {"Egyptian demotic"}, ["Egyh"] = {"Egyptian hieratic"}, ["Egyp"] = {"Egyptian hieroglyphs"}, ["Elba"] = {"Elbasan"}, ["Elym"] = {"Elymaic"}, ["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"}, ["Gara"] = {"Garay"}, ["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"}, ["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"}, ["Glag"] = {"Glagolitic"}, ["Gong"] = {"Gunjala Gondi"}, ["Gonm"] = {"Masaram Gondi"}, ["Goth"] = {"Gothic"}, ["Gran"] = {"Grantha"}, ["Grek"] = {"Greek"}, ["Gujr"] = {"Gujarati"}, ["Gukh"] = {"Gurung Khema"}, ["Guru"] = {"Gurmukhi"}, ["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"}, ["Hang"] = {"Hangul", "Hangŭl", "Hangeul"}, ["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"}, ["Hano"] = {"Hanunoo", "Hanunóo"}, ["Hans"] = {"Han (Simplified variant)"}, ["Hant"] = {"Han (Traditional variant)"}, ["Hatr"] = {"Hatran"}, ["Hebr"] = {"Hebrew"}, ["Hira"] = {"Hiragana"}, ["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"}, ["Hmng"] = {"Pahawh Hmong"}, ["Hmnp"] = {"Nyiakeng Puachue Hmong"}, ["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"}, ["Hung"] = {"Old Hungarian", "Hungarian Runic"}, ["Inds"] = {"Indus", "Harappan"}, ["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"}, ["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"}, ["Java"] = {"Javanese"}, ["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"}, ["Jurc"] = {"Jurchen"}, ["Kali"] = {"Kayah Li"}, ["Kana"] = {"Katakana"}, ["Kawi"] = {"Kawi"}, ["Khar"] = {"Kharoshthi"}, ["Khmr"] = {"Khmer"}, ["Khoj"] = {"Khojki"}, ["Kitl"] = {"Khitan large script"}, ["Kits"] = {"Khitan small script"}, ["Knda"] = {"Kannada"}, ["Kore"] = {"Korean (alias for Hangul + Han)"}, ["Kpel"] = {"Kpelle"}, ["Krai"] = {"Kirat Rai"}, ["Kthi"] = {"Kaithi"}, ["Lana"] = {"Tai Tham", "Lanna"}, ["Laoo"] = {"Lao"}, ["Latf"] = {"Latin (Fraktur variant)"}, ["Latg"] = {"Latin (Gaelic variant)"}, ["Latn"] = {"Latin"}, ["Leke"] = {"Leke"}, ["Lepc"] = {"Lepcha", "Róng"}, ["Limb"] = {"Limbu"}, ["Lina"] = {"Linear A"}, ["Linb"] = {"Linear B"}, ["Lisu"] = {"Lisu", "Fraser"}, ["Loma"] = {"Loma"}, ["Lyci"] = {"Lycian"}, ["Lydi"] = {"Lydian"}, ["Mahj"] = {"Mahajani"}, ["Maka"] = {"Makasar"}, ["Mand"] = {"Mandaic", "Mandaean"}, ["Mani"] = {"Manichaean"}, ["Marc"] = {"Marchen"}, ["Maya"] = {"Mayan hieroglyphs"}, ["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"}, ["Mend"] = {"Mende Kikakui"}, ["Merc"] = {"Meroitic Cursive"}, ["Mero"] = {"Meroitic Hieroglyphs"}, ["Mlym"] = {"Malayalam"}, ["Modi"] = {"Modi", "Moḍī"}, ["Mong"] = {"Mongolian"}, ["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"}, ["Mroo"] = {"Mro", "Mru"}, ["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"}, ["Mult"] = {"Multani"}, ["Mymr"] = {"Myanmar", "Burmese"}, ["Nagm"] = {"Nag Mundari"}, ["Nand"] = {"Nandinagari"}, ["Narb"] = {"Old North Arabian", "Ancient North Arabian"}, ["Nbat"] = {"Nabataean"}, ["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"}, ["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"}, ["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"}, ["Nkoo"] = {"N’Ko", "N'Ko"}, ["Nshu"] = {"Nüshu"}, ["Ogam"] = {"Ogham"}, ["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"}, ["Onao"] = {"Ol Onal"}, ["Orkh"] = {"Old Turkic", "Orkhon Runic"}, ["Orya"] = {"Oriya", "Odia"}, ["Osge"] = {"Osage"}, ["Osma"] = {"Osmanya"}, ["Ougr"] = {"Old Uyghur"}, ["Palm"] = {"Palmyrene"}, ["Pauc"] = {"Pau Cin Hau"}, ["Pcun"] = {"Proto-Cuneiform"}, ["Pelm"] = {"Proto-Elamite"}, ["Perm"] = {"Old Permic"}, ["Phag"] = {"Phags-pa"}, ["Phli"] = {"Inscriptional Pahlavi"}, ["Phlp"] = {"Psalter Pahlavi"}, ["Phlv"] = {"Book Pahlavi"}, ["Phnx"] = {"Phoenician"}, ["Piqd"] = {"Klingon (KLI pIqaD)"}, ["Plrd"] = {"Miao", "Pollard"}, ["Prti"] = {"Inscriptional Parthian"}, ["Psin"] = {"Proto-Sinaitic"}, ["Ranj"] = {"Ranjana"}, ["Rjng"] = {"Rejang", "Redjang", "Kaganga"}, ["Rohg"] = {"Hanifi Rohingya"}, ["Roro"] = {"Rongorongo"}, ["Runr"] = {"Runic"}, ["Samr"] = {"Samaritan"}, ["Sara"] = {"Sarati"}, ["Sarb"] = {"Old South Arabian"}, ["Saur"] = {"Saurashtra"}, ["Sgnw"] = {"SignWriting"}, ["Shaw"] = {"Shavian", "Shaw"}, ["Shrd"] = {"Sharada", "Śāradā"}, ["Shui"] = {"Shuishu"}, ["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"}, ["Sidt"] = {"Sidetic"}, ["Sind"] = {"Khudawadi", "Sindhi"}, ["Sinh"] = {"Sinhala"}, ["Sogd"] = {"Sogdian"}, ["Sogo"] = {"Old Sogdian"}, ["Sora"] = {"Sora Sompeng"}, ["Soyo"] = {"Soyombo"}, ["Sund"] = {"Sundanese"}, ["Sunu"] = {"Sunuwar"}, ["Sylo"] = {"Syloti Nagri"}, ["Syrc"] = {"Syriac"}, ["Syre"] = {"Syriac (Estrangelo variant)"}, ["Syrj"] = {"Syriac (Western variant)"}, ["Syrn"] = {"Syriac (Eastern variant)"}, ["Tagb"] = {"Tagbanwa"}, ["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"}, ["Tale"] = {"Tai Le"}, ["Talu"] = {"New Tai Lue"}, ["Taml"] = {"Tamil"}, ["Tang"] = {"Tangut"}, ["Tavt"] = {"Tai Viet"}, ["Tayo"] = {"Tai Yo"}, ["Telu"] = {"Telugu"}, ["Teng"] = {"Tengwar"}, ["Tfng"] = {"Tifinagh", "Berber"}, ["Tglg"] = {"Tagalog", "Baybayin", "Alibata"}, ["Thaa"] = {"Thaana"}, ["Thai"] = {"Thai"}, ["Tibt"] = {"Tibetan"}, ["Tirh"] = {"Tirhuta"}, ["Tnsa"] = {"Tangsa"}, ["Todr"] = {"Todhri"}, ["Tols"] = {"Tolong Siki"}, ["Toto"] = {"Toto"}, ["Tutg"] = {"Tulu-Tigalari"}, ["Ugar"] = {"Ugaritic"}, ["Vaii"] = {"Vai"}, ["Visp"] = {"Visible Speech"}, ["Vith"] = {"Vithkuqi"}, ["Wara"] = {"Warang Citi", "Varang Kshiti"}, ["Wcho"] = {"Wancho"}, ["Wole"] = {"Woleai"}, ["Xpeo"] = {"Old Persian"}, ["Xsux"] = {"Sumero-Akkadian cuneiform"}, ["Yezi"] = {"Yezidi"}, ["Yiii"] = {"Yi"}, ["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"}, ["Zinh"] = {"Code for inherited script"}, ["Zmth"] = {"Mathematical notation"}, ["Zsye"] = {"Symbols (Emoji variant)"}, ["Zsym"] = {"Symbols"}, ["Zxxx"] = {"Code for unwritten documents"}, ["Zyyy"] = {"Code for undetermined script"}, ["Zzzz"] = {"Code for uncoded script"} } 90e7ff616b305955e94fca8cce479cc69e5277c4 Module:Language/data/iana regions 828 97 268 267 2024-02-07T02:44:09Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Language/data/iana_regions]] Scribunto text/plain -- File-Date: 2023-10-16 return { ["AC"] = {"Ascension Island"}, ["AD"] = {"Andorra"}, ["AE"] = {"United Arab Emirates"}, ["AF"] = {"Afghanistan"}, ["AG"] = {"Antigua and Barbuda"}, ["AI"] = {"Anguilla"}, ["AL"] = {"Albania"}, ["AM"] = {"Armenia"}, ["AO"] = {"Angola"}, ["AQ"] = {"Antarctica"}, ["AR"] = {"Argentina"}, ["AS"] = {"American Samoa"}, ["AT"] = {"Austria"}, ["AU"] = {"Australia"}, ["AW"] = {"Aruba"}, ["AX"] = {"Åland Islands"}, ["AZ"] = {"Azerbaijan"}, ["BA"] = {"Bosnia and Herzegovina"}, ["BB"] = {"Barbados"}, ["BD"] = {"Bangladesh"}, ["BE"] = {"Belgium"}, ["BF"] = {"Burkina Faso"}, ["BG"] = {"Bulgaria"}, ["BH"] = {"Bahrain"}, ["BI"] = {"Burundi"}, ["BJ"] = {"Benin"}, ["BL"] = {"Saint Barthélemy"}, ["BM"] = {"Bermuda"}, ["BN"] = {"Brunei Darussalam"}, ["BO"] = {"Bolivia"}, ["BQ"] = {"Bonaire, Sint Eustatius and Saba"}, ["BR"] = {"Brazil"}, ["BS"] = {"Bahamas"}, ["BT"] = {"Bhutan"}, ["BV"] = {"Bouvet Island"}, ["BW"] = {"Botswana"}, ["BY"] = {"Belarus"}, ["BZ"] = {"Belize"}, ["CA"] = {"Canada"}, ["CC"] = {"Cocos (Keeling) Islands"}, ["CD"] = {"The Democratic Republic of the Congo"}, ["CF"] = {"Central African Republic"}, ["CG"] = {"Congo"}, ["CH"] = {"Switzerland"}, ["CI"] = {"Côte d'Ivoire"}, ["CK"] = {"Cook Islands"}, ["CL"] = {"Chile"}, ["CM"] = {"Cameroon"}, ["CN"] = {"China"}, ["CO"] = {"Colombia"}, ["CP"] = {"Clipperton Island"}, ["CQ"] = {"Sark"}, ["CR"] = {"Costa Rica"}, ["CU"] = {"Cuba"}, ["CV"] = {"Cabo Verde", "Cape Verde"}, ["CW"] = {"Curaçao"}, ["CX"] = {"Christmas Island"}, ["CY"] = {"Cyprus"}, ["CZ"] = {"Czechia", "Czech Republic"}, ["DE"] = {"Germany"}, ["DG"] = {"Diego Garcia"}, ["DJ"] = {"Djibouti"}, ["DK"] = {"Denmark"}, ["DM"] = {"Dominica"}, ["DO"] = {"Dominican Republic"}, ["DZ"] = {"Algeria"}, ["EA"] = {"Ceuta, Melilla"}, ["EC"] = {"Ecuador"}, ["EE"] = {"Estonia"}, ["EG"] = {"Egypt"}, ["EH"] = {"Western Sahara"}, ["ER"] = {"Eritrea"}, ["ES"] = {"Spain"}, ["ET"] = {"Ethiopia"}, ["EU"] = {"European Union"}, ["EZ"] = {"Eurozone"}, ["FI"] = {"Finland"}, ["FJ"] = {"Fiji"}, ["FK"] = {"Falkland Islands (Malvinas)"}, ["FM"] = {"Federated States of Micronesia"}, ["FO"] = {"Faroe Islands"}, ["FR"] = {"France"}, ["GA"] = {"Gabon"}, ["GB"] = {"United Kingdom"}, ["GD"] = {"Grenada"}, ["GE"] = {"Georgia"}, ["GF"] = {"French Guiana"}, ["GG"] = {"Guernsey"}, ["GH"] = {"Ghana"}, ["GI"] = {"Gibraltar"}, ["GL"] = {"Greenland"}, ["GM"] = {"Gambia"}, ["GN"] = {"Guinea"}, ["GP"] = {"Guadeloupe"}, ["GQ"] = {"Equatorial Guinea"}, ["GR"] = {"Greece"}, ["GS"] = {"South Georgia and the South Sandwich Islands"}, ["GT"] = {"Guatemala"}, ["GU"] = {"Guam"}, ["GW"] = {"Guinea-Bissau"}, ["GY"] = {"Guyana"}, ["HK"] = {"Hong Kong"}, ["HM"] = {"Heard Island and McDonald Islands"}, ["HN"] = {"Honduras"}, ["HR"] = {"Croatia"}, ["HT"] = {"Haiti"}, ["HU"] = {"Hungary"}, ["IC"] = {"Canary Islands"}, ["ID"] = {"Indonesia"}, ["IE"] = {"Ireland"}, ["IL"] = {"Israel"}, ["IM"] = {"Isle of Man"}, ["IN"] = {"India"}, ["IO"] = {"British Indian Ocean Territory"}, ["IQ"] = {"Iraq"}, ["IR"] = {"Islamic Republic of Iran"}, ["IS"] = {"Iceland"}, ["IT"] = {"Italy"}, ["JE"] = {"Jersey"}, ["JM"] = {"Jamaica"}, ["JO"] = {"Jordan"}, ["JP"] = {"Japan"}, ["KE"] = {"Kenya"}, ["KG"] = {"Kyrgyzstan"}, ["KH"] = {"Cambodia"}, ["KI"] = {"Kiribati"}, ["KM"] = {"Comoros"}, ["KN"] = {"Saint Kitts and Nevis"}, ["KP"] = {"Democratic People's Republic of Korea"}, ["KR"] = {"Republic of Korea"}, ["KW"] = {"Kuwait"}, ["KY"] = {"Cayman Islands"}, ["KZ"] = {"Kazakhstan"}, ["LA"] = {"Lao People's Democratic Republic"}, ["LB"] = {"Lebanon"}, ["LC"] = {"Saint Lucia"}, ["LI"] = {"Liechtenstein"}, ["LK"] = {"Sri Lanka"}, ["LR"] = {"Liberia"}, ["LS"] = {"Lesotho"}, ["LT"] = {"Lithuania"}, ["LU"] = {"Luxembourg"}, ["LV"] = {"Latvia"}, ["LY"] = {"Libya"}, ["MA"] = {"Morocco"}, ["MC"] = {"Monaco"}, ["MD"] = {"Moldova"}, ["ME"] = {"Montenegro"}, ["MF"] = {"Saint Martin (French part)"}, ["MG"] = {"Madagascar"}, ["MH"] = {"Marshall Islands"}, ["MK"] = {"North Macedonia"}, ["ML"] = {"Mali"}, ["MM"] = {"Myanmar"}, ["MN"] = {"Mongolia"}, ["MO"] = {"Macao"}, ["MP"] = {"Northern Mariana Islands"}, ["MQ"] = {"Martinique"}, ["MR"] = {"Mauritania"}, ["MS"] = {"Montserrat"}, ["MT"] = {"Malta"}, ["MU"] = {"Mauritius"}, ["MV"] = {"Maldives"}, ["MW"] = {"Malawi"}, ["MX"] = {"Mexico"}, ["MY"] = {"Malaysia"}, ["MZ"] = {"Mozambique"}, ["NA"] = {"Namibia"}, ["NC"] = {"New Caledonia"}, ["NE"] = {"Niger"}, ["NF"] = {"Norfolk Island"}, ["NG"] = {"Nigeria"}, ["NI"] = {"Nicaragua"}, ["NL"] = {"Netherlands"}, ["NO"] = {"Norway"}, ["NP"] = {"Nepal"}, ["NR"] = {"Nauru"}, ["NU"] = {"Niue"}, ["NZ"] = {"New Zealand"}, ["OM"] = {"Oman"}, ["PA"] = {"Panama"}, ["PE"] = {"Peru"}, ["PF"] = {"French Polynesia"}, ["PG"] = {"Papua New Guinea"}, ["PH"] = {"Philippines"}, ["PK"] = {"Pakistan"}, ["PL"] = {"Poland"}, ["PM"] = {"Saint Pierre and Miquelon"}, ["PN"] = {"Pitcairn"}, ["PR"] = {"Puerto Rico"}, ["PS"] = {"State of Palestine"}, ["PT"] = {"Portugal"}, ["PW"] = {"Palau"}, ["PY"] = {"Paraguay"}, ["QA"] = {"Qatar"}, ["RE"] = {"Réunion"}, ["RO"] = {"Romania"}, ["RS"] = {"Serbia"}, ["RU"] = {"Russian Federation"}, ["RW"] = {"Rwanda"}, ["SA"] = {"Saudi Arabia"}, ["SB"] = {"Solomon Islands"}, ["SC"] = {"Seychelles"}, ["SD"] = {"Sudan"}, ["SE"] = {"Sweden"}, ["SG"] = {"Singapore"}, ["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {"Slovenia"}, ["SJ"] = {"Svalbard and Jan Mayen"}, ["SK"] = {"Slovakia"}, ["SL"] = {"Sierra Leone"}, ["SM"] = {"San Marino"}, ["SN"] = {"Senegal"}, ["SO"] = {"Somalia"}, ["SR"] = {"Suriname"}, ["SS"] = {"South Sudan"}, ["ST"] = {"Sao Tome and Principe"}, ["SV"] = {"El Salvador"}, ["SX"] = {"Sint Maarten (Dutch part)"}, ["SY"] = {"Syrian Arab Republic"}, ["SZ"] = {"Eswatini", "eSwatini", "Swaziland"}, ["TA"] = {"Tristan da Cunha"}, ["TC"] = {"Turks and Caicos Islands"}, ["TD"] = {"Chad"}, ["TF"] = {"French Southern Territories"}, ["TG"] = {"Togo"}, ["TH"] = {"Thailand"}, ["TJ"] = {"Tajikistan"}, ["TK"] = {"Tokelau"}, ["TL"] = {"Timor-Leste"}, ["TM"] = {"Turkmenistan"}, ["TN"] = {"Tunisia"}, ["TO"] = {"Tonga"}, ["TR"] = {"Türkiye", "Turkey"}, ["TT"] = {"Trinidad and Tobago"}, ["TV"] = {"Tuvalu"}, ["TW"] = {"Taiwan, Province of China"}, ["TZ"] = {"United Republic of Tanzania"}, ["UA"] = {"Ukraine"}, ["UG"] = {"Uganda"}, ["UM"] = {"United States Minor Outlying Islands"}, ["UN"] = {"United Nations"}, ["US"] = {"United States"}, ["UY"] = {"Uruguay"}, ["UZ"] = {"Uzbekistan"}, ["VA"] = {"Holy See (Vatican City State)"}, ["VC"] = {"Saint Vincent and the Grenadines"}, ["VE"] = {"Venezuela"}, ["VG"] = {"British Virgin Islands"}, ["VI"] = {"U.S. Virgin Islands"}, ["VN"] = {"Viet Nam"}, ["VU"] = {"Vanuatu"}, ["WF"] = {"Wallis and Futuna"}, ["WS"] = {"Samoa"}, ["YE"] = {"Yemen"}, ["YT"] = {"Mayotte"}, ["ZA"] = {"South Africa"}, ["ZM"] = {"Zambia"}, ["ZW"] = {"Zimbabwe"}, ["001"] = {"World"}, ["002"] = {"Africa"}, ["003"] = {"North America"}, ["005"] = {"South America"}, ["009"] = {"Oceania"}, ["011"] = {"Western Africa"}, ["013"] = {"Central America"}, ["014"] = {"Eastern Africa"}, ["015"] = {"Northern Africa"}, ["017"] = {"Middle Africa"}, ["018"] = {"Southern Africa"}, ["019"] = {"Americas"}, ["021"] = {"Northern America"}, ["029"] = {"Caribbean"}, ["030"] = {"Eastern Asia"}, ["034"] = {"Southern Asia"}, ["035"] = {"South-Eastern Asia"}, ["039"] = {"Southern Europe"}, ["053"] = {"Australia and New Zealand"}, ["054"] = {"Melanesia"}, ["057"] = {"Micronesia"}, ["061"] = {"Polynesia"}, ["142"] = {"Asia"}, ["143"] = {"Central Asia"}, ["145"] = {"Western Asia"}, ["150"] = {"Europe"}, ["151"] = {"Eastern Europe"}, ["154"] = {"Northern Europe"}, ["155"] = {"Western Europe"}, ["202"] = {"Sub-Saharan Africa"}, ["419"] = {"Latin America and the Caribbean"} } 38ed555cd3945668fad81deefcc2ce6558bff172 Module:Language/data/iana variants 828 98 270 269 2024-02-07T02:44:10Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Language/data/iana_variants]] Scribunto text/plain -- File-Date: 2023-10-16 return { ["1606nict"] = { ["descriptions"] = {"Late Middle French (to 1606)"}, ["prefixes"] = {"frm"}, }, ["1694acad"] = { ["descriptions"] = {"Early Modern French"}, ["prefixes"] = {"fr"}, }, ["1901"] = { ["descriptions"] = {"Traditional German orthography"}, ["prefixes"] = {"de"}, }, ["1959acad"] = { ["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"}, ["prefixes"] = {"be"}, }, ["1994"] = { ["descriptions"] = {"Standardized Resian orthography"}, ["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, }, ["1996"] = { ["descriptions"] = {"German orthography of 1996"}, ["prefixes"] = {"de"}, }, ["abl1943"] = { ["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"}, ["prefixes"] = {"pt-br"}, }, ["akuapem"] = { ["descriptions"] = {"Akuapem Twi"}, ["prefixes"] = {"tw"}, }, ["alalc97"] = { ["descriptions"] = {"ALA-LC Romanization, 1997 edition"}, ["prefixes"] = {}, }, ["aluku"] = { ["descriptions"] = {"Aluku dialect", "Boni dialect"}, ["prefixes"] = {"djk"}, }, ["ao1990"] = { ["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"}, ["prefixes"] = {"pt", "gl"}, }, ["aranes"] = { ["descriptions"] = {"Aranese"}, ["prefixes"] = {"oc"}, }, ["arkaika"] = { ["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"}, ["prefixes"] = {"eo"}, }, ["asante"] = { ["descriptions"] = {"Asante Twi", "Ashanti Twi"}, ["prefixes"] = {"tw"}, }, ["auvern"] = { ["descriptions"] = {"Auvergnat"}, ["prefixes"] = {"oc"}, }, ["baku1926"] = { ["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"}, ["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, }, ["balanka"] = { ["descriptions"] = {"The Balanka dialect of Anii"}, ["prefixes"] = {"blo"}, }, ["barla"] = { ["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["basiceng"] = { ["descriptions"] = {"Basic English"}, ["prefixes"] = {"en"}, }, ["bauddha"] = { ["descriptions"] = {"Buddhist Hybrid Sanskrit"}, ["prefixes"] = {"sa"}, }, ["bciav"] = { ["descriptions"] = {"BCI Blissymbolics AV"}, ["prefixes"] = {"zbl"}, }, ["bcizbl"] = { ["descriptions"] = {"BCI Blissymbolics"}, ["prefixes"] = {"zbl"}, }, ["biscayan"] = { ["descriptions"] = {"Biscayan dialect of Basque"}, ["prefixes"] = {"eu"}, }, ["biske"] = { ["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["blasl"] = { ["descriptions"] = {"Black American Sign Language dialect"}, ["prefixes"] = {"ase", "sgn-ase"}, }, ["bohoric"] = { ["descriptions"] = {"Slovene in Bohorič alphabet"}, ["prefixes"] = {"sl"}, }, ["boont"] = { ["descriptions"] = {"Boontling"}, ["prefixes"] = {"en"}, }, ["bornholm"] = { ["descriptions"] = {"Bornholmsk"}, ["prefixes"] = {"da"}, }, ["cisaup"] = { ["descriptions"] = {"Cisalpine"}, ["prefixes"] = {"oc"}, }, ["colb1945"] = { ["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"}, ["prefixes"] = {"pt"}, }, ["cornu"] = { ["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"}, ["prefixes"] = {"en"}, }, ["creiss"] = { ["descriptions"] = {"Occitan variants of the Croissant area"}, ["prefixes"] = {"oc"}, }, ["dajnko"] = { ["descriptions"] = {"Slovene in Dajnko alphabet"}, ["prefixes"] = {"sl"}, }, ["ekavsk"] = { ["descriptions"] = {"Serbian with Ekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["emodeng"] = { ["descriptions"] = {"Early Modern English (1500-1700)"}, ["prefixes"] = {"en"}, }, ["fonipa"] = { ["descriptions"] = {"International Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonkirsh"] = { ["descriptions"] = {"Kirshenbaum Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonnapa"] = { ["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"}, ["prefixes"] = {}, }, ["fonupa"] = { ["descriptions"] = {"Uralic Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonxsamp"] = { ["descriptions"] = {"X-SAMPA transcription"}, ["prefixes"] = {}, }, ["gallo"] = { ["descriptions"] = {"Gallo"}, ["prefixes"] = {"fr"}, }, ["gascon"] = { ["descriptions"] = {"Gascon"}, ["prefixes"] = {"oc"}, }, ["grclass"] = { ["descriptions"] = {"Classical Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["grital"] = { ["descriptions"] = {"Italian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, }, ["grmistr"] = { ["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["hepburn"] = { ["descriptions"] = {"Hepburn romanization"}, ["prefixes"] = {"ja-latn"}, }, ["hognorsk"] = { ["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"}, ["prefixes"] = {"nn"}, }, ["hsistemo"] = { ["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, }, ["ijekavsk"] = { ["descriptions"] = {"Serbian with Ijekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["itihasa"] = { ["descriptions"] = {"Epic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["ivanchov"] = { ["descriptions"] = {"Bulgarian in 1899 orthography"}, ["prefixes"] = {"bg"}, }, ["jauer"] = { ["descriptions"] = {"Jauer dialect of Romansh"}, ["prefixes"] = {"rm"}, }, ["jyutping"] = { ["descriptions"] = {"Jyutping Cantonese Romanization"}, ["prefixes"] = {"yue"}, }, ["kkcor"] = { ["descriptions"] = {"Common Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["kociewie"] = { ["descriptions"] = {"The Kociewie dialect of Polish"}, ["prefixes"] = {"pl"}, }, ["kscor"] = { ["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"}, ["prefixes"] = {"kw"}, }, ["laukika"] = { ["descriptions"] = {"Classical Sanskrit"}, ["prefixes"] = {"sa"}, }, ["lemosin"] = { ["descriptions"] = {"Limousin"}, ["prefixes"] = {"oc"}, }, ["lengadoc"] = { ["descriptions"] = {"Languedocien"}, ["prefixes"] = {"oc"}, }, ["lipaw"] = { ["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["ltg1929"] = { ["descriptions"] = {"The Latgalian language orthography codified in 1929"}, ["prefixes"] = {"ltg"}, }, ["ltg2007"] = { ["descriptions"] = {"The Latgalian language orthography codified in the language law in 2007"}, ["prefixes"] = {"ltg"}, }, ["luna1918"] = { ["descriptions"] = {"Post-1917 Russian orthography"}, ["prefixes"] = {"ru"}, }, ["metelko"] = { ["descriptions"] = {"Slovene in Metelko alphabet"}, ["prefixes"] = {"sl"}, }, ["monoton"] = { ["descriptions"] = {"Monotonic Greek"}, ["prefixes"] = {"el"}, }, ["ndyuka"] = { ["descriptions"] = {"Ndyuka dialect", "Aukan dialect"}, ["prefixes"] = {"djk"}, }, ["nedis"] = { ["descriptions"] = {"Natisone dialect", "Nadiza dialect"}, ["prefixes"] = {"sl"}, }, ["newfound"] = { ["descriptions"] = {"Newfoundland English"}, ["prefixes"] = {"en-ca"}, }, ["nicard"] = { ["descriptions"] = {"Niçard"}, ["prefixes"] = {"oc"}, }, ["njiva"] = { ["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["nulik"] = { ["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"}, ["prefixes"] = {"vo"}, }, ["osojs"] = { ["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["oxendict"] = { ["descriptions"] = {"Oxford English Dictionary spelling"}, ["prefixes"] = {"en"}, }, ["pahawh2"] = { ["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh3"] = { ["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh4"] = { ["descriptions"] = {"Pahawh Hmong Final Version orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pamaka"] = { ["descriptions"] = {"Pamaka dialect"}, ["prefixes"] = {"djk"}, }, ["peano"] = { ["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"}, ["prefixes"] = {"la"}, }, ["petr1708"] = { ["descriptions"] = {"Petrine orthography"}, ["prefixes"] = {"ru"}, }, ["pinyin"] = { ["descriptions"] = {"Pinyin romanization"}, ["prefixes"] = {"zh-latn", "bo-latn"}, }, ["polyton"] = { ["descriptions"] = {"Polytonic Greek"}, ["prefixes"] = {"el"}, }, ["provenc"] = { ["descriptions"] = {"Provençal"}, ["prefixes"] = {"oc"}, }, ["puter"] = { ["descriptions"] = {"Puter idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["rigik"] = { ["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"}, ["prefixes"] = {"vo"}, }, ["rozaj"] = { ["descriptions"] = {"Resian", "Resianic", "Rezijan"}, ["prefixes"] = {"sl"}, }, ["rumgr"] = { ["descriptions"] = {"Rumantsch Grischun"}, ["prefixes"] = {"rm"}, }, ["scotland"] = { ["descriptions"] = {"Scottish Standard English"}, ["prefixes"] = {"en"}, }, ["scouse"] = { ["descriptions"] = {"Scouse"}, ["prefixes"] = {"en"}, }, ["simple"] = { ["descriptions"] = {"Simplified form"}, ["prefixes"] = {}, }, ["solba"] = { ["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["sotav"] = { ["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["spanglis"] = { ["descriptions"] = {"Spanglish"}, ["prefixes"] = {"en", "es"}, }, ["surmiran"] = { ["descriptions"] = {"Surmiran idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sursilv"] = { ["descriptions"] = {"Sursilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sutsilv"] = { ["descriptions"] = {"Sutsilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["synnejyl"] = { ["descriptions"] = {"Synnejysk", "South Jutish"}, ["prefixes"] = {"da"}, }, ["tarask"] = { ["descriptions"] = {"Belarusian in Taraskievica orthography"}, ["prefixes"] = {"be"}, }, ["tongyong"] = { ["descriptions"] = {"Tongyong Pinyin romanization"}, ["prefixes"] = {"zh-latn"}, }, ["tunumiit"] = { ["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"}, ["prefixes"] = {"kl"}, }, ["uccor"] = { ["descriptions"] = {"Unified Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ucrcor"] = { ["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ulster"] = { ["descriptions"] = {"Ulster dialect of Scots"}, ["prefixes"] = {"sco"}, }, ["unifon"] = { ["descriptions"] = {"Unifon phonetic alphabet"}, ["prefixes"] = {"en", "hup", "kyh", "tol", "yur"}, }, ["vaidika"] = { ["descriptions"] = {"Vedic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["valencia"] = { ["descriptions"] = {"Valencian"}, ["prefixes"] = {"ca"}, }, ["vallader"] = { ["descriptions"] = {"Vallader idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["vecdruka"] = { ["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"}, ["prefixes"] = {"lv"}, }, ["vivaraup"] = { ["descriptions"] = {"Vivaro-Alpine"}, ["prefixes"] = {"oc"}, }, ["wadegile"] = { ["descriptions"] = {"Wade-Giles romanization"}, ["prefixes"] = {"zh-latn"}, }, ["xsistemo"] = { ["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, } } fe5d6330175026010e0d8d9aef185dbd571c3d57 Module:Language/data/iana suppressed scripts 828 99 272 271 2024-02-07T02:44:10Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Language/data/iana_suppressed_scripts]] Scribunto text/plain -- File-Date: 2023-10-16 return { ["Arab"] = {"ar", "fa", "ps", "ur"}, ["Armn"] = {"hy"}, ["Beng"] = {"as", "bn"}, ["Blis"] = {"zbl"}, ["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"}, ["Deva"] = {"hi", "mr", "ne", "kok", "mai"}, ["Ethi"] = {"am", "ti"}, ["Geor"] = {"ka"}, ["Grek"] = {"el"}, ["Gujr"] = {"gu"}, ["Guru"] = {"pa"}, ["Hebr"] = {"he", "iw", "yi"}, ["Jpan"] = {"ja"}, ["Khmr"] = {"km"}, ["Knda"] = {"kn"}, ["Kore"] = {"ko"}, ["Laoo"] = {"lo"}, ["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo", "es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn", "gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb", "ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd", "nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn", "ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv", "sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb", "frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh", "tpi", "tvl"}, ["Mlym"] = {"ml"}, ["Mymr"] = {"my"}, ["Nkoo"] = {"nqo"}, ["Orya"] = {"or"}, ["Sinh"] = {"si"}, ["Taml"] = {"ta"}, ["Telu"] = {"te"}, ["Thaa"] = {"dv"}, ["Thai"] = {"th"}, ["Tibt"] = {"dz"} } 1708132b06b72c9ca4217aaa0ddc8a1e8b234646 Module:Lang/ISO 639 synonyms 828 100 274 273 2024-02-07T02:44:11Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Lang/ISO_639_synonyms]] Scribunto text/plain -- File-Date: 2013-01-11 return { ["aar"] = "aa", ["abk"] = "ab", ["afr"] = "af", ["aka"] = "ak", ["amh"] = "am", ["ara"] = "ar", ["arg"] = "an", ["asm"] = "as", ["ava"] = "av", ["ave"] = "ae", ["aym"] = "ay", ["aze"] = "az", ["bak"] = "ba", ["bam"] = "bm", ["bel"] = "be", ["ben"] = "bn", ["bih"] = "bh", ["bis"] = "bi", ["bod"] = "bo", ["bos"] = "bs", ["bre"] = "br", ["bul"] = "bg", ["cat"] = "ca", ["ces"] = "cs", ["cha"] = "ch", ["che"] = "ce", ["chu"] = "cu", ["chv"] = "cv", ["cor"] = "kw", ["cos"] = "co", ["cre"] = "cr", ["cym"] = "cy", ["dan"] = "da", ["deu"] = "de", ["div"] = "dv", ["dzo"] = "dz", ["ell"] = "el", ["eng"] = "en", ["epo"] = "eo", ["est"] = "et", ["eus"] = "eu", ["ewe"] = "ee", ["fao"] = "fo", ["fas"] = "fa", ["fij"] = "fj", ["fin"] = "fi", ["fra"] = "fr", ["fry"] = "fy", ["ful"] = "ff", ["gla"] = "gd", ["gle"] = "ga", ["glg"] = "gl", ["glv"] = "gv", ["grn"] = "gn", ["guj"] = "gu", ["hat"] = "ht", ["hau"] = "ha", ["heb"] = "he", ["her"] = "hz", ["hin"] = "hi", ["hmo"] = "ho", ["hrv"] = "hr", ["hun"] = "hu", ["hye"] = "hy", ["ibo"] = "ig", ["ido"] = "io", ["iii"] = "ii", ["iku"] = "iu", ["ile"] = "ie", ["ina"] = "ia", ["ind"] = "id", ["ipk"] = "ik", ["isl"] = "is", ["ita"] = "it", ["jav"] = "jv", ["jpn"] = "ja", ["kal"] = "kl", ["kan"] = "kn", ["kas"] = "ks", ["kat"] = "ka", ["kau"] = "kr", ["kaz"] = "kk", ["khm"] = "km", ["kik"] = "ki", ["kin"] = "rw", ["kir"] = "ky", ["kom"] = "kv", ["kon"] = "kg", ["kor"] = "ko", ["kua"] = "kj", ["kur"] = "ku", ["lao"] = "lo", ["lat"] = "la", ["lav"] = "lv", ["lim"] = "li", ["lin"] = "ln", ["lit"] = "lt", ["ltz"] = "lb", ["lub"] = "lu", ["lug"] = "lg", ["mah"] = "mh", ["mal"] = "ml", ["mar"] = "mr", ["mkd"] = "mk", ["mlg"] = "mg", ["mlt"] = "mt", ["mon"] = "mn", ["mri"] = "mi", ["msa"] = "ms", ["mya"] = "my", ["nau"] = "na", ["nav"] = "nv", ["nbl"] = "nr", ["nde"] = "nd", ["ndo"] = "ng", ["nep"] = "ne", ["nld"] = "nl", ["nno"] = "nn", ["nob"] = "nb", ["nor"] = "no", ["nya"] = "ny", ["oci"] = "oc", ["oji"] = "oj", ["ori"] = "or", ["orm"] = "om", ["oss"] = "os", ["pan"] = "pa", ["pli"] = "pi", ["pol"] = "pl", ["por"] = "pt", ["pus"] = "ps", ["que"] = "qu", ["roh"] = "rm", ["ron"] = "ro", ["run"] = "rn", ["rus"] = "ru", ["sag"] = "sg", ["san"] = "sa", ["sin"] = "si", ["slk"] = "sk", ["slv"] = "sl", ["sme"] = "se", ["smo"] = "sm", ["sna"] = "sn", ["snd"] = "sd", ["som"] = "so", ["sot"] = "st", ["spa"] = "es", ["sqi"] = "sq", ["srd"] = "sc", ["srp"] = "sr", ["ssw"] = "ss", ["sun"] = "su", ["swa"] = "sw", ["swe"] = "sv", ["tah"] = "ty", ["tam"] = "ta", ["tat"] = "tt", ["tel"] = "te", ["tgk"] = "tg", ["tgl"] = "tl", ["tha"] = "th", ["tir"] = "ti", ["ton"] = "to", ["tsn"] = "tn", ["tso"] = "ts", ["tuk"] = "tk", ["tur"] = "tr", ["twi"] = "tw", ["uig"] = "ug", ["ukr"] = "uk", ["urd"] = "ur", ["uzb"] = "uz", ["ven"] = "ve", ["vie"] = "vi", ["vol"] = "vo", ["wln"] = "wa", ["wol"] = "wo", ["xho"] = "xh", ["yid"] = "yi", ["yor"] = "yo", ["zha"] = "za", ["zho"] = "zh", ["zul"] = "zu" } f3fb5374c9e0fdef6ce6ea22736b79468358ca19 Template:Mbox 10 101 276 275 2024-02-07T02:44:12Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Mbox]] wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5bfb2becf8bed35974b47e3ff8660dc14bee40c7 Template:Lang 10 102 278 277 2024-02-07T02:44:18Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Lang]] wikitext text/x-wiki <includeonly>{{#invoke:Lang|{{{fn|lang}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> ed35aafbfe8198c5ad80fd861124244d0c7f2742 Module:Exponential search 828 103 280 279 2024-02-07T02:44:19Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Exponential_search]] Scribunto text/plain -- This module provides a generic exponential search algorithm. require[[strict]] local checkType = require('libraryUtil').checkType local floor = math.floor local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2) end local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1 == upper then return i end lower = i if upper then i = midPoint(lower, upper) else i = i * 2 end return search(testFunc, i, lower, upper) else upper = i i = midPoint(lower, upper) return search(testFunc, i, lower, upper) end end return function (testFunc, init) checkType('Exponential search', 1, testFunc, 'function') checkType('Exponential search', 2, init, 'number', true) if init and (init < 1 or init ~= floor(init) or init == math.huge) then error(string.format( "invalid init value '%s' detected in argument #2 to " .. "'Exponential search' (init value must be a positive integer)", tostring(init) ), 2) end init = init or 2 if not testFunc(1) then return nil end return search(testFunc, init, 1, nil) end a9037be0c44536be79b2d7a26155bfb907368ae7 Module:Labelled list hatnote 828 104 282 281 2024-02-07T02:44:21Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Labelled_list_hatnote]] Scribunto text/plain -------------------------------------------------------------------------------- -- Labelled list -- -- -- -- This module does the core work of creating a hatnote composed of a list -- -- prefixed by a colon-terminated label, i.e. "LABEL: [andList of pages]", -- -- for {{see also}} and similar templates. -- -------------------------------------------------------------------------------- local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local yesno --initialize lazily local p = {} -- Defaults global to this module local defaults = { label = 'See also', --Final fallback for label argument labelForm = '%s: %s', prefixes = {'label', 'label ', 'l'}, template = 'Module:Labelled list hatnote' } -- Localizable message strings local msg = { errorSuffix = '#Errors', noInputWarning = 'no page names specified', noOutputWarning = "'''[[%s]] — no output: none of the target pages exist.'''" } -- Helper function that pre-combines display parameters into page arguments. -- Also compresses sparse arrays, as a desirable side-effect. function p.preprocessDisplays (args, prefixes) -- Prefixes specify which parameters, in order, to check for display options -- They each have numbers auto-appended, e.g. 'label1', 'label 1', & 'l1' prefixes = prefixes or defaults.prefixes local indices = {} local sparsePages = {} for k, v in pairs(args) do if type(k) == 'number' then indices[#indices + 1] = k local display for i = 1, #prefixes do display = args[prefixes[i] .. k] if display then break end end sparsePages[k] = display and string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v end end table.sort(indices) local pages = {} for k, v in ipairs(indices) do pages[#pages + 1] = sparsePages[v] end return pages end --Helper function to get a page target from a processed page string --e.g. "Page|Label" → "Page" or "Target" → "Target" local function getTarget(pagename) local pipe = string.find(pagename, '|') return string.sub(pagename, 0, pipe and pipe - 1 or nil) end -- Produces a labelled pages-list hatnote. -- The main frame (template definition) takes 1 or 2 arguments, for a singular -- and (optionally) plural label respectively: -- * {{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}} -- The resulting template takes pagename & label parameters normally. function p.labelledList (frame) mArguments = require('Module:Arguments') yesno = require('Module:Yesno') local labels = {frame.args[1] or defaults.label} labels[2] = frame.args[2] or labels[1] labels[3] = frame.args[3] --no defaulting labels[4] = frame.args[4] --no defaulting local template = frame:getParent():getTitle() local args = mArguments.getArgs(frame, {parentOnly = true}) local pages = p.preprocessDisplays(args) local options = { category = yesno(args.category), extraclasses = frame.args.extraclasses, ifexists = yesno(frame.args.ifexists), namespace = frame.args.namespace or args.namespace, selfref = yesno(frame.args.selfref or args.selfref), template = template } return p._labelledList(pages, labels, options) end function p._labelledList (pages, labels, options) if options.ifexists then for k = #pages, 1, -1 do --iterate backwards to allow smooth removals local v = pages[k] local title = mw.title.new(getTarget(v), namespace) if (v == '') or title == nil or not title.exists then table.remove(pages, k) end end end labels = labels or {} label = (#pages == 1 and labels[1] or labels[2]) or defaults.label for k, v in pairs(pages) do if mHatnote.findNamespaceId(v) ~= 0 then label = ( #pages == 1 and (labels[3] or labels[1] or defaults.label) or (labels[4] or labels[2] or defaults.label) ) or defaults.label end end if #pages == 0 then if options.ifexists then mw.addWarning( string.format( msg.noOutputWarning, options.template or defaults.template ) ) return '' else return mHatnote.makeWikitextError( msg.noInputWarning, (options.template or defaults.template) .. msg.errorSuffix, options.category ) end end local text = string.format( options.labelForm or defaults.labelForm, label, mHatlist.andList(pages, true) ) local hnOptions = { extraclasses = options.extraclasses, selfref = options.selfref } return mHatnote._hatnote(text, hnOptions) end return p b7a8ba27cf6195e6427701b94e8d2acad3c40a21 Module:Unicode data/scripts 828 105 284 283 2024-02-07T02:44:22Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Unicode_data/scripts]] Scribunto text/plain --[=[ -- Official Unicode script values for individual codepoints and ranges of -- codepoints. -- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided -- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- provided script codes corresponding to the names (see [[Script (Unicode)]]). --]=] local data = { singles = { [0x000AA] = "Latn", [0x000BA] = "Latn", [0x000D7] = "Zyyy", [0x000F7] = "Zyyy", [0x00374] = "Zyyy", [0x0037E] = "Zyyy", [0x0037F] = "Grek", [0x00384] = "Grek", [0x00385] = "Zyyy", [0x00386] = "Grek", [0x00387] = "Zyyy", [0x0038C] = "Grek", [0x00605] = "Zyyy", [0x0060C] = "Zyyy", [0x0061B] = "Zyyy", [0x0061F] = "Zyyy", [0x00640] = "Zyyy", [0x00670] = "Zinh", [0x006DD] = "Zyyy", [0x0085E] = "Mand", [0x008E2] = "Zyyy", [0x009B2] = "Beng", [0x009D7] = "Beng", [0x00A3C] = "Guru", [0x00A51] = "Guru", [0x00A5E] = "Guru", [0x00AD0] = "Gujr", [0x00B9C] = "Taml", [0x00BD0] = "Taml", [0x00BD7] = "Taml", [0x00C5D] = "Telu", [0x00DBD] = "Sinh", [0x00DCA] = "Sinh", [0x00DD6] = "Sinh", [0x00E3F] = "Zyyy", [0x00E84] = "Laoo", [0x00EA5] = "Laoo", [0x00EC6] = "Laoo", [0x010C7] = "Geor", [0x010CD] = "Geor", [0x010FB] = "Zyyy", [0x01258] = "Ethi", [0x012C0] = "Ethi", [0x0171F] = "Tglg", [0x01804] = "Mong", [0x01805] = "Zyyy", [0x01940] = "Limb", [0x01CD3] = "Zyyy", [0x01CE1] = "Zyyy", [0x01CED] = "Zinh", [0x01CF4] = "Zinh", [0x01CFA] = "Zyyy", [0x01D2B] = "Cyrl", [0x01D78] = "Cyrl", [0x01DBF] = "Grek", [0x01F59] = "Grek", [0x01F5B] = "Grek", [0x01F5D] = "Grek", [0x02071] = "Latn", [0x0207F] = "Latn", [0x02126] = "Grek", [0x02132] = "Latn", [0x0214E] = "Latn", [0x02D27] = "Geor", [0x02D2D] = "Geor", [0x02D7F] = "Tfng", [0x03005] = "Hani", [0x03006] = "Zyyy", [0x03007] = "Hani", [0x030A0] = "Zyyy", [0x031EF] = "Zyyy", [0x032FF] = "Zyyy", [0x0A7D3] = "Latn", [0x0A92E] = "Zyyy", [0x0A92F] = "Kali", [0x0A95F] = "Rjng", [0x0A9CF] = "Zyyy", [0x0AB5B] = "Zyyy", [0x0AB65] = "Grek", [0x0FB3E] = "Hebr", [0x0FDCF] = "Arab", [0x0FEFF] = "Zyyy", [0x0FF70] = "Zyyy", [0x101A0] = "Grek", [0x101FD] = "Zinh", [0x102E0] = "Zinh", [0x1039F] = "Ugar", [0x1056F] = "Aghb", [0x10808] = "Cprt", [0x1083C] = "Cprt", [0x1083F] = "Cprt", [0x1091F] = "Phnx", [0x1093F] = "Lydi", [0x1107F] = "Brah", [0x110CD] = "Kthi", [0x11288] = "Mult", [0x1133B] = "Zinh", [0x11350] = "Gran", [0x11357] = "Gran", [0x118FF] = "Wara", [0x11909] = "Diak", [0x11D3A] = "Gonm", [0x11FB0] = "Lisu", [0x11FFF] = "Taml", [0x16FE0] = "Tang", [0x16FE1] = "Nshu", [0x16FE4] = "Kits", [0x1B000] = "Kana", [0x1B132] = "Hira", [0x1B155] = "Kana", [0x1D4A2] = "Zyyy", [0x1D4BB] = "Zyyy", [0x1D546] = "Zyyy", [0x1E08F] = "Cyrl", [0x1E2FF] = "Wcho", [0x1EE24] = "Arab", [0x1EE27] = "Arab", [0x1EE39] = "Arab", [0x1EE3B] = "Arab", [0x1EE42] = "Arab", [0x1EE47] = "Arab", [0x1EE49] = "Arab", [0x1EE4B] = "Arab", [0x1EE54] = "Arab", [0x1EE57] = "Arab", [0x1EE59] = "Arab", [0x1EE5B] = "Arab", [0x1EE5D] = "Arab", [0x1EE5F] = "Arab", [0x1EE64] = "Arab", [0x1EE7E] = "Arab", [0x1F200] = "Hira", [0x1F7F0] = "Zyyy", [0xE0001] = "Zyyy", }, ranges = { { 0x00000, 0x00040, "Zyyy" }, { 0x00041, 0x0005A, "Latn" }, { 0x0005B, 0x00060, "Zyyy" }, { 0x00061, 0x0007A, "Latn" }, { 0x0007B, 0x000A9, "Zyyy" }, { 0x000AB, 0x000B9, "Zyyy" }, { 0x000BB, 0x000BF, "Zyyy" }, { 0x000C0, 0x000D6, "Latn" }, { 0x000D8, 0x000F6, "Latn" }, { 0x000F8, 0x002B8, "Latn" }, { 0x002B9, 0x002DF, "Zyyy" }, { 0x002E0, 0x002E4, "Latn" }, { 0x002E5, 0x002E9, "Zyyy" }, { 0x002EA, 0x002EB, "Bopo" }, { 0x002EC, 0x002FF, "Zyyy" }, { 0x00300, 0x0036F, "Zinh" }, { 0x00370, 0x00373, "Grek" }, { 0x00375, 0x00377, "Grek" }, { 0x0037A, 0x0037D, "Grek" }, { 0x00388, 0x0038A, "Grek" }, { 0x0038E, 0x003A1, "Grek" }, { 0x003A3, 0x003E1, "Grek" }, { 0x003E2, 0x003EF, "Copt" }, { 0x003F0, 0x003FF, "Grek" }, { 0x00400, 0x00484, "Cyrl" }, { 0x00485, 0x00486, "Zinh" }, { 0x00487, 0x0052F, "Cyrl" }, { 0x00531, 0x00556, "Armn" }, { 0x00559, 0x0058A, "Armn" }, { 0x0058D, 0x0058F, "Armn" }, { 0x00591, 0x005C7, "Hebr" }, { 0x005D0, 0x005EA, "Hebr" }, { 0x005EF, 0x005F4, "Hebr" }, { 0x00600, 0x00604, "Arab" }, { 0x00606, 0x0060B, "Arab" }, { 0x0060D, 0x0061A, "Arab" }, { 0x0061C, 0x0061E, "Arab" }, { 0x00620, 0x0063F, "Arab" }, { 0x00641, 0x0064A, "Arab" }, { 0x0064B, 0x00655, "Zinh" }, { 0x00656, 0x0066F, "Arab" }, { 0x00671, 0x006DC, "Arab" }, { 0x006DE, 0x006FF, "Arab" }, { 0x00700, 0x0070D, "Syrc" }, { 0x0070F, 0x0074A, "Syrc" }, { 0x0074D, 0x0074F, "Syrc" }, { 0x00750, 0x0077F, "Arab" }, { 0x00780, 0x007B1, "Thaa" }, { 0x007C0, 0x007FA, "Nkoo" }, { 0x007FD, 0x007FF, "Nkoo" }, { 0x00800, 0x0082D, "Samr" }, { 0x00830, 0x0083E, "Samr" }, { 0x00840, 0x0085B, "Mand" }, { 0x00860, 0x0086A, "Syrc" }, { 0x00870, 0x0088E, "Arab" }, { 0x00890, 0x00891, "Arab" }, { 0x00898, 0x008E1, "Arab" }, { 0x008E3, 0x008FF, "Arab" }, { 0x00900, 0x00950, "Deva" }, { 0x00951, 0x00954, "Zinh" }, { 0x00955, 0x00963, "Deva" }, { 0x00964, 0x00965, "Zyyy" }, { 0x00966, 0x0097F, "Deva" }, { 0x00980, 0x00983, "Beng" }, { 0x00985, 0x0098C, "Beng" }, { 0x0098F, 0x00990, "Beng" }, { 0x00993, 0x009A8, "Beng" }, { 0x009AA, 0x009B0, "Beng" }, { 0x009B6, 0x009B9, "Beng" }, { 0x009BC, 0x009C4, "Beng" }, { 0x009C7, 0x009C8, "Beng" }, { 0x009CB, 0x009CE, "Beng" }, { 0x009DC, 0x009DD, "Beng" }, { 0x009DF, 0x009E3, "Beng" }, { 0x009E6, 0x009FE, "Beng" }, { 0x00A01, 0x00A03, "Guru" }, { 0x00A05, 0x00A0A, "Guru" }, { 0x00A0F, 0x00A10, "Guru" }, { 0x00A13, 0x00A28, "Guru" }, { 0x00A2A, 0x00A30, "Guru" }, { 0x00A32, 0x00A33, "Guru" }, { 0x00A35, 0x00A36, "Guru" }, { 0x00A38, 0x00A39, "Guru" }, { 0x00A3E, 0x00A42, "Guru" }, { 0x00A47, 0x00A48, "Guru" }, { 0x00A4B, 0x00A4D, "Guru" }, { 0x00A59, 0x00A5C, "Guru" }, { 0x00A66, 0x00A76, "Guru" }, { 0x00A81, 0x00A83, "Gujr" }, { 0x00A85, 0x00A8D, "Gujr" }, { 0x00A8F, 0x00A91, "Gujr" }, { 0x00A93, 0x00AA8, "Gujr" }, { 0x00AAA, 0x00AB0, "Gujr" }, { 0x00AB2, 0x00AB3, "Gujr" }, { 0x00AB5, 0x00AB9, "Gujr" }, { 0x00ABC, 0x00AC5, "Gujr" }, { 0x00AC7, 0x00AC9, "Gujr" }, { 0x00ACB, 0x00ACD, "Gujr" }, { 0x00AE0, 0x00AE3, "Gujr" }, { 0x00AE6, 0x00AF1, "Gujr" }, { 0x00AF9, 0x00AFF, "Gujr" }, { 0x00B01, 0x00B03, "Orya" }, { 0x00B05, 0x00B0C, "Orya" }, { 0x00B0F, 0x00B10, "Orya" }, { 0x00B13, 0x00B28, "Orya" }, { 0x00B2A, 0x00B30, "Orya" }, { 0x00B32, 0x00B33, "Orya" }, { 0x00B35, 0x00B39, "Orya" }, { 0x00B3C, 0x00B44, "Orya" }, { 0x00B47, 0x00B48, "Orya" }, { 0x00B4B, 0x00B4D, "Orya" }, { 0x00B55, 0x00B57, "Orya" }, { 0x00B5C, 0x00B5D, "Orya" }, { 0x00B5F, 0x00B63, "Orya" }, { 0x00B66, 0x00B77, "Orya" }, { 0x00B82, 0x00B83, "Taml" }, { 0x00B85, 0x00B8A, "Taml" }, { 0x00B8E, 0x00B90, "Taml" }, { 0x00B92, 0x00B95, "Taml" }, { 0x00B99, 0x00B9A, "Taml" }, { 0x00B9E, 0x00B9F, "Taml" }, { 0x00BA3, 0x00BA4, "Taml" }, { 0x00BA8, 0x00BAA, "Taml" }, { 0x00BAE, 0x00BB9, "Taml" }, { 0x00BBE, 0x00BC2, "Taml" }, { 0x00BC6, 0x00BC8, "Taml" }, { 0x00BCA, 0x00BCD, "Taml" }, { 0x00BE6, 0x00BFA, "Taml" }, { 0x00C00, 0x00C0C, "Telu" }, { 0x00C0E, 0x00C10, "Telu" }, { 0x00C12, 0x00C28, "Telu" }, { 0x00C2A, 0x00C39, "Telu" }, { 0x00C3C, 0x00C44, "Telu" }, { 0x00C46, 0x00C48, "Telu" }, { 0x00C4A, 0x00C4D, "Telu" }, { 0x00C55, 0x00C56, "Telu" }, { 0x00C58, 0x00C5A, "Telu" }, { 0x00C60, 0x00C63, "Telu" }, { 0x00C66, 0x00C6F, "Telu" }, { 0x00C77, 0x00C7F, "Telu" }, { 0x00C80, 0x00C8C, "Knda" }, { 0x00C8E, 0x00C90, "Knda" }, { 0x00C92, 0x00CA8, "Knda" }, { 0x00CAA, 0x00CB3, "Knda" }, { 0x00CB5, 0x00CB9, "Knda" }, { 0x00CBC, 0x00CC4, "Knda" }, { 0x00CC6, 0x00CC8, "Knda" }, { 0x00CCA, 0x00CCD, "Knda" }, { 0x00CD5, 0x00CD6, "Knda" }, { 0x00CDD, 0x00CDE, "Knda" }, { 0x00CE0, 0x00CE3, "Knda" }, { 0x00CE6, 0x00CEF, "Knda" }, { 0x00CF1, 0x00CF3, "Knda" }, { 0x00D00, 0x00D0C, "Mlym" }, { 0x00D0E, 0x00D10, "Mlym" }, { 0x00D12, 0x00D44, "Mlym" }, { 0x00D46, 0x00D48, "Mlym" }, { 0x00D4A, 0x00D4F, "Mlym" }, { 0x00D54, 0x00D63, "Mlym" }, { 0x00D66, 0x00D7F, "Mlym" }, { 0x00D81, 0x00D83, "Sinh" }, { 0x00D85, 0x00D96, "Sinh" }, { 0x00D9A, 0x00DB1, "Sinh" }, { 0x00DB3, 0x00DBB, "Sinh" }, { 0x00DC0, 0x00DC6, "Sinh" }, { 0x00DCF, 0x00DD4, "Sinh" }, { 0x00DD8, 0x00DDF, "Sinh" }, { 0x00DE6, 0x00DEF, "Sinh" }, { 0x00DF2, 0x00DF4, "Sinh" }, { 0x00E01, 0x00E3A, "Thai" }, { 0x00E40, 0x00E5B, "Thai" }, { 0x00E81, 0x00E82, "Laoo" }, { 0x00E86, 0x00E8A, "Laoo" }, { 0x00E8C, 0x00EA3, "Laoo" }, { 0x00EA7, 0x00EBD, "Laoo" }, { 0x00EC0, 0x00EC4, "Laoo" }, { 0x00EC8, 0x00ECE, "Laoo" }, { 0x00ED0, 0x00ED9, "Laoo" }, { 0x00EDC, 0x00EDF, "Laoo" }, { 0x00F00, 0x00F47, "Tibt" }, { 0x00F49, 0x00F6C, "Tibt" }, { 0x00F71, 0x00F97, "Tibt" }, { 0x00F99, 0x00FBC, "Tibt" }, { 0x00FBE, 0x00FCC, "Tibt" }, { 0x00FCE, 0x00FD4, "Tibt" }, { 0x00FD5, 0x00FD8, "Zyyy" }, { 0x00FD9, 0x00FDA, "Tibt" }, { 0x01000, 0x0109F, "Mymr" }, { 0x010A0, 0x010C5, "Geor" }, { 0x010D0, 0x010FA, "Geor" }, { 0x010FC, 0x010FF, "Geor" }, { 0x01100, 0x011FF, "Hang" }, { 0x01200, 0x01248, "Ethi" }, { 0x0124A, 0x0124D, "Ethi" }, { 0x01250, 0x01256, "Ethi" }, { 0x0125A, 0x0125D, "Ethi" }, { 0x01260, 0x01288, "Ethi" }, { 0x0128A, 0x0128D, "Ethi" }, { 0x01290, 0x012B0, "Ethi" }, { 0x012B2, 0x012B5, "Ethi" }, { 0x012B8, 0x012BE, "Ethi" }, { 0x012C2, 0x012C5, "Ethi" }, { 0x012C8, 0x012D6, "Ethi" }, { 0x012D8, 0x01310, "Ethi" }, { 0x01312, 0x01315, "Ethi" }, { 0x01318, 0x0135A, "Ethi" }, { 0x0135D, 0x0137C, "Ethi" }, { 0x01380, 0x01399, "Ethi" }, { 0x013A0, 0x013F5, "Cher" }, { 0x013F8, 0x013FD, "Cher" }, { 0x01400, 0x0167F, "Cans" }, { 0x01680, 0x0169C, "Ogam" }, { 0x016A0, 0x016EA, "Runr" }, { 0x016EB, 0x016ED, "Zyyy" }, { 0x016EE, 0x016F8, "Runr" }, { 0x01700, 0x01715, "Tglg" }, { 0x01720, 0x01734, "Hano" }, { 0x01735, 0x01736, "Zyyy" }, { 0x01740, 0x01753, "Buhd" }, { 0x01760, 0x0176C, "Tagb" }, { 0x0176E, 0x01770, "Tagb" }, { 0x01772, 0x01773, "Tagb" }, { 0x01780, 0x017DD, "Khmr" }, { 0x017E0, 0x017E9, "Khmr" }, { 0x017F0, 0x017F9, "Khmr" }, { 0x01800, 0x01801, "Mong" }, { 0x01802, 0x01803, "Zyyy" }, { 0x01806, 0x01819, "Mong" }, { 0x01820, 0x01878, "Mong" }, { 0x01880, 0x018AA, "Mong" }, { 0x018B0, 0x018F5, "Cans" }, { 0x01900, 0x0191E, "Limb" }, { 0x01920, 0x0192B, "Limb" }, { 0x01930, 0x0193B, "Limb" }, { 0x01944, 0x0194F, "Limb" }, { 0x01950, 0x0196D, "Tale" }, { 0x01970, 0x01974, "Tale" }, { 0x01980, 0x019AB, "Talu" }, { 0x019B0, 0x019C9, "Talu" }, { 0x019D0, 0x019DA, "Talu" }, { 0x019DE, 0x019DF, "Talu" }, { 0x019E0, 0x019FF, "Khmr" }, { 0x01A00, 0x01A1B, "Bugi" }, { 0x01A1E, 0x01A1F, "Bugi" }, { 0x01A20, 0x01A5E, "Lana" }, { 0x01A60, 0x01A7C, "Lana" }, { 0x01A7F, 0x01A89, "Lana" }, { 0x01A90, 0x01A99, "Lana" }, { 0x01AA0, 0x01AAD, "Lana" }, { 0x01AB0, 0x01ACE, "Zinh" }, { 0x01B00, 0x01B4C, "Bali" }, { 0x01B50, 0x01B7E, "Bali" }, { 0x01B80, 0x01BBF, "Sund" }, { 0x01BC0, 0x01BF3, "Batk" }, { 0x01BFC, 0x01BFF, "Batk" }, { 0x01C00, 0x01C37, "Lepc" }, { 0x01C3B, 0x01C49, "Lepc" }, { 0x01C4D, 0x01C4F, "Lepc" }, { 0x01C50, 0x01C7F, "Olck" }, { 0x01C80, 0x01C88, "Cyrl" }, { 0x01C90, 0x01CBA, "Geor" }, { 0x01CBD, 0x01CBF, "Geor" }, { 0x01CC0, 0x01CC7, "Sund" }, { 0x01CD0, 0x01CD2, "Zinh" }, { 0x01CD4, 0x01CE0, "Zinh" }, { 0x01CE2, 0x01CE8, "Zinh" }, { 0x01CE9, 0x01CEC, "Zyyy" }, { 0x01CEE, 0x01CF3, "Zyyy" }, { 0x01CF5, 0x01CF7, "Zyyy" }, { 0x01CF8, 0x01CF9, "Zinh" }, { 0x01D00, 0x01D25, "Latn" }, { 0x01D26, 0x01D2A, "Grek" }, { 0x01D2C, 0x01D5C, "Latn" }, { 0x01D5D, 0x01D61, "Grek" }, { 0x01D62, 0x01D65, "Latn" }, { 0x01D66, 0x01D6A, "Grek" }, { 0x01D6B, 0x01D77, "Latn" }, { 0x01D79, 0x01DBE, "Latn" }, { 0x01DC0, 0x01DFF, "Zinh" }, { 0x01E00, 0x01EFF, "Latn" }, { 0x01F00, 0x01F15, "Grek" }, { 0x01F18, 0x01F1D, "Grek" }, { 0x01F20, 0x01F45, "Grek" }, { 0x01F48, 0x01F4D, "Grek" }, { 0x01F50, 0x01F57, "Grek" }, { 0x01F5F, 0x01F7D, "Grek" }, { 0x01F80, 0x01FB4, "Grek" }, { 0x01FB6, 0x01FC4, "Grek" }, { 0x01FC6, 0x01FD3, "Grek" }, { 0x01FD6, 0x01FDB, "Grek" }, { 0x01FDD, 0x01FEF, "Grek" }, { 0x01FF2, 0x01FF4, "Grek" }, { 0x01FF6, 0x01FFE, "Grek" }, { 0x02000, 0x0200B, "Zyyy" }, { 0x0200C, 0x0200D, "Zinh" }, { 0x0200E, 0x02064, "Zyyy" }, { 0x02066, 0x02070, "Zyyy" }, { 0x02074, 0x0207E, "Zyyy" }, { 0x02080, 0x0208E, "Zyyy" }, { 0x02090, 0x0209C, "Latn" }, { 0x020A0, 0x020C0, "Zyyy" }, { 0x020D0, 0x020F0, "Zinh" }, { 0x02100, 0x02125, "Zyyy" }, { 0x02127, 0x02129, "Zyyy" }, { 0x0212A, 0x0212B, "Latn" }, { 0x0212C, 0x02131, "Zyyy" }, { 0x02133, 0x0214D, "Zyyy" }, { 0x0214F, 0x0215F, "Zyyy" }, { 0x02160, 0x02188, "Latn" }, { 0x02189, 0x0218B, "Zyyy" }, { 0x02190, 0x02426, "Zyyy" }, { 0x02440, 0x0244A, "Zyyy" }, { 0x02460, 0x027FF, "Zyyy" }, { 0x02800, 0x028FF, "Brai" }, { 0x02900, 0x02B73, "Zyyy" }, { 0x02B76, 0x02B95, "Zyyy" }, { 0x02B97, 0x02BFF, "Zyyy" }, { 0x02C00, 0x02C5F, "Glag" }, { 0x02C60, 0x02C7F, "Latn" }, { 0x02C80, 0x02CF3, "Copt" }, { 0x02CF9, 0x02CFF, "Copt" }, { 0x02D00, 0x02D25, "Geor" }, { 0x02D30, 0x02D67, "Tfng" }, { 0x02D6F, 0x02D70, "Tfng" }, { 0x02D80, 0x02D96, "Ethi" }, { 0x02DA0, 0x02DA6, "Ethi" }, { 0x02DA8, 0x02DAE, "Ethi" }, { 0x02DB0, 0x02DB6, "Ethi" }, { 0x02DB8, 0x02DBE, "Ethi" }, { 0x02DC0, 0x02DC6, "Ethi" }, { 0x02DC8, 0x02DCE, "Ethi" }, { 0x02DD0, 0x02DD6, "Ethi" }, { 0x02DD8, 0x02DDE, "Ethi" }, { 0x02DE0, 0x02DFF, "Cyrl" }, { 0x02E00, 0x02E5D, "Zyyy" }, { 0x02E80, 0x02E99, "Hani" }, { 0x02E9B, 0x02EF3, "Hani" }, { 0x02F00, 0x02FD5, "Hani" }, { 0x02FF0, 0x03004, "Zyyy" }, { 0x03008, 0x03020, "Zyyy" }, { 0x03021, 0x03029, "Hani" }, { 0x0302A, 0x0302D, "Zinh" }, { 0x0302E, 0x0302F, "Hang" }, { 0x03030, 0x03037, "Zyyy" }, { 0x03038, 0x0303B, "Hani" }, { 0x0303C, 0x0303F, "Zyyy" }, { 0x03041, 0x03096, "Hira" }, { 0x03099, 0x0309A, "Zinh" }, { 0x0309B, 0x0309C, "Zyyy" }, { 0x0309D, 0x0309F, "Hira" }, { 0x030A1, 0x030FA, "Kana" }, { 0x030FB, 0x030FC, "Zyyy" }, { 0x030FD, 0x030FF, "Kana" }, { 0x03105, 0x0312F, "Bopo" }, { 0x03131, 0x0318E, "Hang" }, { 0x03190, 0x0319F, "Zyyy" }, { 0x031A0, 0x031BF, "Bopo" }, { 0x031C0, 0x031E3, "Zyyy" }, { 0x031F0, 0x031FF, "Kana" }, { 0x03200, 0x0321E, "Hang" }, { 0x03220, 0x0325F, "Zyyy" }, { 0x03260, 0x0327E, "Hang" }, { 0x0327F, 0x032CF, "Zyyy" }, { 0x032D0, 0x032FE, "Kana" }, { 0x03300, 0x03357, "Kana" }, { 0x03358, 0x033FF, "Zyyy" }, { 0x03400, 0x04DBF, "Hani" }, { 0x04DC0, 0x04DFF, "Zyyy" }, { 0x04E00, 0x09FFF, "Hani" }, { 0x0A000, 0x0A48C, "Yiii" }, { 0x0A490, 0x0A4C6, "Yiii" }, { 0x0A4D0, 0x0A4FF, "Lisu" }, { 0x0A500, 0x0A62B, "Vaii" }, { 0x0A640, 0x0A69F, "Cyrl" }, { 0x0A6A0, 0x0A6F7, "Bamu" }, { 0x0A700, 0x0A721, "Zyyy" }, { 0x0A722, 0x0A787, "Latn" }, { 0x0A788, 0x0A78A, "Zyyy" }, { 0x0A78B, 0x0A7CA, "Latn" }, { 0x0A7D0, 0x0A7D1, "Latn" }, { 0x0A7D5, 0x0A7D9, "Latn" }, { 0x0A7F2, 0x0A7FF, "Latn" }, { 0x0A800, 0x0A82C, "Sylo" }, { 0x0A830, 0x0A839, "Zyyy" }, { 0x0A840, 0x0A877, "Phag" }, { 0x0A880, 0x0A8C5, "Saur" }, { 0x0A8CE, 0x0A8D9, "Saur" }, { 0x0A8E0, 0x0A8FF, "Deva" }, { 0x0A900, 0x0A92D, "Kali" }, { 0x0A930, 0x0A953, "Rjng" }, { 0x0A960, 0x0A97C, "Hang" }, { 0x0A980, 0x0A9CD, "Java" }, { 0x0A9D0, 0x0A9D9, "Java" }, { 0x0A9DE, 0x0A9DF, "Java" }, { 0x0A9E0, 0x0A9FE, "Mymr" }, { 0x0AA00, 0x0AA36, "Cham" }, { 0x0AA40, 0x0AA4D, "Cham" }, { 0x0AA50, 0x0AA59, "Cham" }, { 0x0AA5C, 0x0AA5F, "Cham" }, { 0x0AA60, 0x0AA7F, "Mymr" }, { 0x0AA80, 0x0AAC2, "Tavt" }, { 0x0AADB, 0x0AADF, "Tavt" }, { 0x0AAE0, 0x0AAF6, "Mtei" }, { 0x0AB01, 0x0AB06, "Ethi" }, { 0x0AB09, 0x0AB0E, "Ethi" }, { 0x0AB11, 0x0AB16, "Ethi" }, { 0x0AB20, 0x0AB26, "Ethi" }, { 0x0AB28, 0x0AB2E, "Ethi" }, { 0x0AB30, 0x0AB5A, "Latn" }, { 0x0AB5C, 0x0AB64, "Latn" }, { 0x0AB66, 0x0AB69, "Latn" }, { 0x0AB6A, 0x0AB6B, "Zyyy" }, { 0x0AB70, 0x0ABBF, "Cher" }, { 0x0ABC0, 0x0ABED, "Mtei" }, { 0x0ABF0, 0x0ABF9, "Mtei" }, { 0x0AC00, 0x0D7A3, "Hang" }, { 0x0D7B0, 0x0D7C6, "Hang" }, { 0x0D7CB, 0x0D7FB, "Hang" }, { 0x0F900, 0x0FA6D, "Hani" }, { 0x0FA70, 0x0FAD9, "Hani" }, { 0x0FB00, 0x0FB06, "Latn" }, { 0x0FB13, 0x0FB17, "Armn" }, { 0x0FB1D, 0x0FB36, "Hebr" }, { 0x0FB38, 0x0FB3C, "Hebr" }, { 0x0FB40, 0x0FB41, "Hebr" }, { 0x0FB43, 0x0FB44, "Hebr" }, { 0x0FB46, 0x0FB4F, "Hebr" }, { 0x0FB50, 0x0FBC2, "Arab" }, { 0x0FBD3, 0x0FD3D, "Arab" }, { 0x0FD3E, 0x0FD3F, "Zyyy" }, { 0x0FD40, 0x0FD8F, "Arab" }, { 0x0FD92, 0x0FDC7, "Arab" }, { 0x0FDF0, 0x0FDFF, "Arab" }, { 0x0FE00, 0x0FE0F, "Zinh" }, { 0x0FE10, 0x0FE19, "Zyyy" }, { 0x0FE20, 0x0FE2D, "Zinh" }, { 0x0FE2E, 0x0FE2F, "Cyrl" }, { 0x0FE30, 0x0FE52, "Zyyy" }, { 0x0FE54, 0x0FE66, "Zyyy" }, { 0x0FE68, 0x0FE6B, "Zyyy" }, { 0x0FE70, 0x0FE74, "Arab" }, { 0x0FE76, 0x0FEFC, "Arab" }, { 0x0FF01, 0x0FF20, "Zyyy" }, { 0x0FF21, 0x0FF3A, "Latn" }, { 0x0FF3B, 0x0FF40, "Zyyy" }, { 0x0FF41, 0x0FF5A, "Latn" }, { 0x0FF5B, 0x0FF65, "Zyyy" }, { 0x0FF66, 0x0FF6F, "Kana" }, { 0x0FF71, 0x0FF9D, "Kana" }, { 0x0FF9E, 0x0FF9F, "Zyyy" }, { 0x0FFA0, 0x0FFBE, "Hang" }, { 0x0FFC2, 0x0FFC7, "Hang" }, { 0x0FFCA, 0x0FFCF, "Hang" }, { 0x0FFD2, 0x0FFD7, "Hang" }, { 0x0FFDA, 0x0FFDC, "Hang" }, { 0x0FFE0, 0x0FFE6, "Zyyy" }, { 0x0FFE8, 0x0FFEE, "Zyyy" }, { 0x0FFF9, 0x0FFFD, "Zyyy" }, { 0x10000, 0x1000B, "Linb" }, { 0x1000D, 0x10026, "Linb" }, { 0x10028, 0x1003A, "Linb" }, { 0x1003C, 0x1003D, "Linb" }, { 0x1003F, 0x1004D, "Linb" }, { 0x10050, 0x1005D, "Linb" }, { 0x10080, 0x100FA, "Linb" }, { 0x10100, 0x10102, "Zyyy" }, { 0x10107, 0x10133, "Zyyy" }, { 0x10137, 0x1013F, "Zyyy" }, { 0x10140, 0x1018E, "Grek" }, { 0x10190, 0x1019C, "Zyyy" }, { 0x101D0, 0x101FC, "Zyyy" }, { 0x10280, 0x1029C, "Lyci" }, { 0x102A0, 0x102D0, "Cari" }, { 0x102E1, 0x102FB, "Zyyy" }, { 0x10300, 0x10323, "Ital" }, { 0x1032D, 0x1032F, "Ital" }, { 0x10330, 0x1034A, "Goth" }, { 0x10350, 0x1037A, "Perm" }, { 0x10380, 0x1039D, "Ugar" }, { 0x103A0, 0x103C3, "Xpeo" }, { 0x103C8, 0x103D5, "Xpeo" }, { 0x10400, 0x1044F, "Dsrt" }, { 0x10450, 0x1047F, "Shaw" }, { 0x10480, 0x1049D, "Osma" }, { 0x104A0, 0x104A9, "Osma" }, { 0x104B0, 0x104D3, "Osge" }, { 0x104D8, 0x104FB, "Osge" }, { 0x10500, 0x10527, "Elba" }, { 0x10530, 0x10563, "Aghb" }, { 0x10570, 0x1057A, "Vith" }, { 0x1057C, 0x1058A, "Vith" }, { 0x1058C, 0x10592, "Vith" }, { 0x10594, 0x10595, "Vith" }, { 0x10597, 0x105A1, "Vith" }, { 0x105A3, 0x105B1, "Vith" }, { 0x105B3, 0x105B9, "Vith" }, { 0x105BB, 0x105BC, "Vith" }, { 0x10600, 0x10736, "Lina" }, { 0x10740, 0x10755, "Lina" }, { 0x10760, 0x10767, "Lina" }, { 0x10780, 0x10785, "Latn" }, { 0x10787, 0x107B0, "Latn" }, { 0x107B2, 0x107BA, "Latn" }, { 0x10800, 0x10805, "Cprt" }, { 0x1080A, 0x10835, "Cprt" }, { 0x10837, 0x10838, "Cprt" }, { 0x10840, 0x10855, "Armi" }, { 0x10857, 0x1085F, "Armi" }, { 0x10860, 0x1087F, "Palm" }, { 0x10880, 0x1089E, "Nbat" }, { 0x108A7, 0x108AF, "Nbat" }, { 0x108E0, 0x108F2, "Hatr" }, { 0x108F4, 0x108F5, "Hatr" }, { 0x108FB, 0x108FF, "Hatr" }, { 0x10900, 0x1091B, "Phnx" }, { 0x10920, 0x10939, "Lydi" }, { 0x10980, 0x1099F, "Mero" }, { 0x109A0, 0x109B7, "Merc" }, { 0x109BC, 0x109CF, "Merc" }, { 0x109D2, 0x109FF, "Merc" }, { 0x10A00, 0x10A03, "Khar" }, { 0x10A05, 0x10A06, "Khar" }, { 0x10A0C, 0x10A13, "Khar" }, { 0x10A15, 0x10A17, "Khar" }, { 0x10A19, 0x10A35, "Khar" }, { 0x10A38, 0x10A3A, "Khar" }, { 0x10A3F, 0x10A48, "Khar" }, { 0x10A50, 0x10A58, "Khar" }, { 0x10A60, 0x10A7F, "Sarb" }, { 0x10A80, 0x10A9F, "Narb" }, { 0x10AC0, 0x10AE6, "Mani" }, { 0x10AEB, 0x10AF6, "Mani" }, { 0x10B00, 0x10B35, "Avst" }, { 0x10B39, 0x10B3F, "Avst" }, { 0x10B40, 0x10B55, "Prti" }, { 0x10B58, 0x10B5F, "Prti" }, { 0x10B60, 0x10B72, "Phli" }, { 0x10B78, 0x10B7F, "Phli" }, { 0x10B80, 0x10B91, "Phlp" }, { 0x10B99, 0x10B9C, "Phlp" }, { 0x10BA9, 0x10BAF, "Phlp" }, { 0x10C00, 0x10C48, "Orkh" }, { 0x10C80, 0x10CB2, "Hung" }, { 0x10CC0, 0x10CF2, "Hung" }, { 0x10CFA, 0x10CFF, "Hung" }, { 0x10D00, 0x10D27, "Rohg" }, { 0x10D30, 0x10D39, "Rohg" }, { 0x10E60, 0x10E7E, "Arab" }, { 0x10E80, 0x10EA9, "Yezi" }, { 0x10EAB, 0x10EAD, "Yezi" }, { 0x10EB0, 0x10EB1, "Yezi" }, { 0x10EFD, 0x10EFF, "Arab" }, { 0x10F00, 0x10F27, "Sogo" }, { 0x10F30, 0x10F59, "Sogd" }, { 0x10F70, 0x10F89, "Ougr" }, { 0x10FB0, 0x10FCB, "Chrs" }, { 0x10FE0, 0x10FF6, "Elym" }, { 0x11000, 0x1104D, "Brah" }, { 0x11052, 0x11075, "Brah" }, { 0x11080, 0x110C2, "Kthi" }, { 0x110D0, 0x110E8, "Sora" }, { 0x110F0, 0x110F9, "Sora" }, { 0x11100, 0x11134, "Cakm" }, { 0x11136, 0x11147, "Cakm" }, { 0x11150, 0x11176, "Mahj" }, { 0x11180, 0x111DF, "Shrd" }, { 0x111E1, 0x111F4, "Sinh" }, { 0x11200, 0x11211, "Khoj" }, { 0x11213, 0x11241, "Khoj" }, { 0x11280, 0x11286, "Mult" }, { 0x1128A, 0x1128D, "Mult" }, { 0x1128F, 0x1129D, "Mult" }, { 0x1129F, 0x112A9, "Mult" }, { 0x112B0, 0x112EA, "Sind" }, { 0x112F0, 0x112F9, "Sind" }, { 0x11300, 0x11303, "Gran" }, { 0x11305, 0x1130C, "Gran" }, { 0x1130F, 0x11310, "Gran" }, { 0x11313, 0x11328, "Gran" }, { 0x1132A, 0x11330, "Gran" }, { 0x11332, 0x11333, "Gran" }, { 0x11335, 0x11339, "Gran" }, { 0x1133C, 0x11344, "Gran" }, { 0x11347, 0x11348, "Gran" }, { 0x1134B, 0x1134D, "Gran" }, { 0x1135D, 0x11363, "Gran" }, { 0x11366, 0x1136C, "Gran" }, { 0x11370, 0x11374, "Gran" }, { 0x11400, 0x1145B, "Newa" }, { 0x1145D, 0x11461, "Newa" }, { 0x11480, 0x114C7, "Tirh" }, { 0x114D0, 0x114D9, "Tirh" }, { 0x11580, 0x115B5, "Sidd" }, { 0x115B8, 0x115DD, "Sidd" }, { 0x11600, 0x11644, "Modi" }, { 0x11650, 0x11659, "Modi" }, { 0x11660, 0x1166C, "Mong" }, { 0x11680, 0x116B9, "Takr" }, { 0x116C0, 0x116C9, "Takr" }, { 0x11700, 0x1171A, "Ahom" }, { 0x1171D, 0x1172B, "Ahom" }, { 0x11730, 0x11746, "Ahom" }, { 0x11800, 0x1183B, "Dogr" }, { 0x118A0, 0x118F2, "Wara" }, { 0x11900, 0x11906, "Diak" }, { 0x1190C, 0x11913, "Diak" }, { 0x11915, 0x11916, "Diak" }, { 0x11918, 0x11935, "Diak" }, { 0x11937, 0x11938, "Diak" }, { 0x1193B, 0x11946, "Diak" }, { 0x11950, 0x11959, "Diak" }, { 0x119A0, 0x119A7, "Nand" }, { 0x119AA, 0x119D7, "Nand" }, { 0x119DA, 0x119E4, "Nand" }, { 0x11A00, 0x11A47, "Zanb" }, { 0x11A50, 0x11AA2, "Soyo" }, { 0x11AB0, 0x11ABF, "Cans" }, { 0x11AC0, 0x11AF8, "Pauc" }, { 0x11B00, 0x11B09, "Deva" }, { 0x11C00, 0x11C08, "Bhks" }, { 0x11C0A, 0x11C36, "Bhks" }, { 0x11C38, 0x11C45, "Bhks" }, { 0x11C50, 0x11C6C, "Bhks" }, { 0x11C70, 0x11C8F, "Marc" }, { 0x11C92, 0x11CA7, "Marc" }, { 0x11CA9, 0x11CB6, "Marc" }, { 0x11D00, 0x11D06, "Gonm" }, { 0x11D08, 0x11D09, "Gonm" }, { 0x11D0B, 0x11D36, "Gonm" }, { 0x11D3C, 0x11D3D, "Gonm" }, { 0x11D3F, 0x11D47, "Gonm" }, { 0x11D50, 0x11D59, "Gonm" }, { 0x11D60, 0x11D65, "Gong" }, { 0x11D67, 0x11D68, "Gong" }, { 0x11D6A, 0x11D8E, "Gong" }, { 0x11D90, 0x11D91, "Gong" }, { 0x11D93, 0x11D98, "Gong" }, { 0x11DA0, 0x11DA9, "Gong" }, { 0x11EE0, 0x11EF8, "Maka" }, { 0x11F00, 0x11F10, "Kawi" }, { 0x11F12, 0x11F3A, "Kawi" }, { 0x11F3E, 0x11F59, "Kawi" }, { 0x11FC0, 0x11FF1, "Taml" }, { 0x12000, 0x12399, "Xsux" }, { 0x12400, 0x1246E, "Xsux" }, { 0x12470, 0x12474, "Xsux" }, { 0x12480, 0x12543, "Xsux" }, { 0x12F90, 0x12FF2, "Cpmn" }, { 0x13000, 0x13455, "Egyp" }, { 0x14400, 0x14646, "Hluw" }, { 0x16800, 0x16A38, "Bamu" }, { 0x16A40, 0x16A5E, "Mroo" }, { 0x16A60, 0x16A69, "Mroo" }, { 0x16A6E, 0x16A6F, "Mroo" }, { 0x16A70, 0x16ABE, "Tnsa" }, { 0x16AC0, 0x16AC9, "Tnsa" }, { 0x16AD0, 0x16AED, "Bass" }, { 0x16AF0, 0x16AF5, "Bass" }, { 0x16B00, 0x16B45, "Hmng" }, { 0x16B50, 0x16B59, "Hmng" }, { 0x16B5B, 0x16B61, "Hmng" }, { 0x16B63, 0x16B77, "Hmng" }, { 0x16B7D, 0x16B8F, "Hmng" }, { 0x16E40, 0x16E9A, "Medf" }, { 0x16F00, 0x16F4A, "Plrd" }, { 0x16F4F, 0x16F87, "Plrd" }, { 0x16F8F, 0x16F9F, "Plrd" }, { 0x16FE2, 0x16FE3, "Hani" }, { 0x16FF0, 0x16FF1, "Hani" }, { 0x17000, 0x187F7, "Tang" }, { 0x18800, 0x18AFF, "Tang" }, { 0x18B00, 0x18CD5, "Kits" }, { 0x18D00, 0x18D08, "Tang" }, { 0x1AFF0, 0x1AFF3, "Kana" }, { 0x1AFF5, 0x1AFFB, "Kana" }, { 0x1AFFD, 0x1AFFE, "Kana" }, { 0x1B001, 0x1B11F, "Hira" }, { 0x1B120, 0x1B122, "Kana" }, { 0x1B150, 0x1B152, "Hira" }, { 0x1B164, 0x1B167, "Kana" }, { 0x1B170, 0x1B2FB, "Nshu" }, { 0x1BC00, 0x1BC6A, "Dupl" }, { 0x1BC70, 0x1BC7C, "Dupl" }, { 0x1BC80, 0x1BC88, "Dupl" }, { 0x1BC90, 0x1BC99, "Dupl" }, { 0x1BC9C, 0x1BC9F, "Dupl" }, { 0x1BCA0, 0x1BCA3, "Zyyy" }, { 0x1CF00, 0x1CF2D, "Zinh" }, { 0x1CF30, 0x1CF46, "Zinh" }, { 0x1CF50, 0x1CFC3, "Zyyy" }, { 0x1D000, 0x1D0F5, "Zyyy" }, { 0x1D100, 0x1D126, "Zyyy" }, { 0x1D129, 0x1D166, "Zyyy" }, { 0x1D167, 0x1D169, "Zinh" }, { 0x1D16A, 0x1D17A, "Zyyy" }, { 0x1D17B, 0x1D182, "Zinh" }, { 0x1D183, 0x1D184, "Zyyy" }, { 0x1D185, 0x1D18B, "Zinh" }, { 0x1D18C, 0x1D1A9, "Zyyy" }, { 0x1D1AA, 0x1D1AD, "Zinh" }, { 0x1D1AE, 0x1D1EA, "Zyyy" }, { 0x1D200, 0x1D245, "Grek" }, { 0x1D2C0, 0x1D2D3, "Zyyy" }, { 0x1D2E0, 0x1D2F3, "Zyyy" }, { 0x1D300, 0x1D356, "Zyyy" }, { 0x1D360, 0x1D378, "Zyyy" }, { 0x1D400, 0x1D454, "Zyyy" }, { 0x1D456, 0x1D49C, "Zyyy" }, { 0x1D49E, 0x1D49F, "Zyyy" }, { 0x1D4A5, 0x1D4A6, "Zyyy" }, { 0x1D4A9, 0x1D4AC, "Zyyy" }, { 0x1D4AE, 0x1D4B9, "Zyyy" }, { 0x1D4BD, 0x1D4C3, "Zyyy" }, { 0x1D4C5, 0x1D505, "Zyyy" }, { 0x1D507, 0x1D50A, "Zyyy" }, { 0x1D50D, 0x1D514, "Zyyy" }, { 0x1D516, 0x1D51C, "Zyyy" }, { 0x1D51E, 0x1D539, "Zyyy" }, { 0x1D53B, 0x1D53E, "Zyyy" }, { 0x1D540, 0x1D544, "Zyyy" }, { 0x1D54A, 0x1D550, "Zyyy" }, { 0x1D552, 0x1D6A5, "Zyyy" }, { 0x1D6A8, 0x1D7CB, "Zyyy" }, { 0x1D7CE, 0x1D7FF, "Zyyy" }, { 0x1D800, 0x1DA8B, "Sgnw" }, { 0x1DA9B, 0x1DA9F, "Sgnw" }, { 0x1DAA1, 0x1DAAF, "Sgnw" }, { 0x1DF00, 0x1DF1E, "Latn" }, { 0x1DF25, 0x1DF2A, "Latn" }, { 0x1E000, 0x1E006, "Glag" }, { 0x1E008, 0x1E018, "Glag" }, { 0x1E01B, 0x1E021, "Glag" }, { 0x1E023, 0x1E024, "Glag" }, { 0x1E026, 0x1E02A, "Glag" }, { 0x1E030, 0x1E06D, "Cyrl" }, { 0x1E100, 0x1E12C, "Hmnp" }, { 0x1E130, 0x1E13D, "Hmnp" }, { 0x1E140, 0x1E149, "Hmnp" }, { 0x1E14E, 0x1E14F, "Hmnp" }, { 0x1E290, 0x1E2AE, "Toto" }, { 0x1E2C0, 0x1E2F9, "Wcho" }, { 0x1E4D0, 0x1E4F9, "Nagm" }, { 0x1E7E0, 0x1E7E6, "Ethi" }, { 0x1E7E8, 0x1E7EB, "Ethi" }, { 0x1E7ED, 0x1E7EE, "Ethi" }, { 0x1E7F0, 0x1E7FE, "Ethi" }, { 0x1E800, 0x1E8C4, "Mend" }, { 0x1E8C7, 0x1E8D6, "Mend" }, { 0x1E900, 0x1E94B, "Adlm" }, { 0x1E950, 0x1E959, "Adlm" }, { 0x1E95E, 0x1E95F, "Adlm" }, { 0x1EC71, 0x1ECB4, "Zyyy" }, { 0x1ED01, 0x1ED3D, "Zyyy" }, { 0x1EE00, 0x1EE03, "Arab" }, { 0x1EE05, 0x1EE1F, "Arab" }, { 0x1EE21, 0x1EE22, "Arab" }, { 0x1EE29, 0x1EE32, "Arab" }, { 0x1EE34, 0x1EE37, "Arab" }, { 0x1EE4D, 0x1EE4F, "Arab" }, { 0x1EE51, 0x1EE52, "Arab" }, { 0x1EE61, 0x1EE62, "Arab" }, { 0x1EE67, 0x1EE6A, "Arab" }, { 0x1EE6C, 0x1EE72, "Arab" }, { 0x1EE74, 0x1EE77, "Arab" }, { 0x1EE79, 0x1EE7C, "Arab" }, { 0x1EE80, 0x1EE89, "Arab" }, { 0x1EE8B, 0x1EE9B, "Arab" }, { 0x1EEA1, 0x1EEA3, "Arab" }, { 0x1EEA5, 0x1EEA9, "Arab" }, { 0x1EEAB, 0x1EEBB, "Arab" }, { 0x1EEF0, 0x1EEF1, "Arab" }, { 0x1F000, 0x1F02B, "Zyyy" }, { 0x1F030, 0x1F093, "Zyyy" }, { 0x1F0A0, 0x1F0AE, "Zyyy" }, { 0x1F0B1, 0x1F0BF, "Zyyy" }, { 0x1F0C1, 0x1F0CF, "Zyyy" }, { 0x1F0D1, 0x1F0F5, "Zyyy" }, { 0x1F100, 0x1F1AD, "Zyyy" }, { 0x1F1E6, 0x1F1FF, "Zyyy" }, { 0x1F201, 0x1F202, "Zyyy" }, { 0x1F210, 0x1F23B, "Zyyy" }, { 0x1F240, 0x1F248, "Zyyy" }, { 0x1F250, 0x1F251, "Zyyy" }, { 0x1F260, 0x1F265, "Zyyy" }, { 0x1F300, 0x1F6D7, "Zyyy" }, { 0x1F6DC, 0x1F6EC, "Zyyy" }, { 0x1F6F0, 0x1F6FC, "Zyyy" }, { 0x1F700, 0x1F776, "Zyyy" }, { 0x1F77B, 0x1F7D9, "Zyyy" }, { 0x1F7E0, 0x1F7EB, "Zyyy" }, { 0x1F800, 0x1F80B, "Zyyy" }, { 0x1F810, 0x1F847, "Zyyy" }, { 0x1F850, 0x1F859, "Zyyy" }, { 0x1F860, 0x1F887, "Zyyy" }, { 0x1F890, 0x1F8AD, "Zyyy" }, { 0x1F8B0, 0x1F8B1, "Zyyy" }, { 0x1F900, 0x1FA53, "Zyyy" }, { 0x1FA60, 0x1FA6D, "Zyyy" }, { 0x1FA70, 0x1FA7C, "Zyyy" }, { 0x1FA80, 0x1FA88, "Zyyy" }, { 0x1FA90, 0x1FABD, "Zyyy" }, { 0x1FABF, 0x1FAC5, "Zyyy" }, { 0x1FACE, 0x1FADB, "Zyyy" }, { 0x1FAE0, 0x1FAE8, "Zyyy" }, { 0x1FAF0, 0x1FAF8, "Zyyy" }, { 0x1FB00, 0x1FB92, "Zyyy" }, { 0x1FB94, 0x1FBCA, "Zyyy" }, { 0x1FBF0, 0x1FBF9, "Zyyy" }, { 0x20000, 0x2A6DF, "Hani" }, { 0x2A700, 0x2B739, "Hani" }, { 0x2B740, 0x2B81D, "Hani" }, { 0x2B820, 0x2CEA1, "Hani" }, { 0x2CEB0, 0x2EBE0, "Hani" }, { 0x2EBF0, 0x2EE5D, "Hani" }, { 0x2F800, 0x2FA1D, "Hani" }, { 0x30000, 0x3134A, "Hani" }, { 0x31350, 0x323AF, "Hani" }, { 0xE0020, 0xE007F, "Zyyy" }, { 0xE0100, 0xE01EF, "Zinh" }, }, -- Scripts.txt gives full names; here we consider them aliases to save space. aliases = { Adlm = "Adlam", Aghb = "Caucasian Albanian", Ahom = "Ahom", Arab = "Arabic", Armi = "Imperial Aramaic", Armn = "Armenian", Avst = "Avestan", Bali = "Balinese", Bamu = "Bamum", Bass = "Bassa Vah", Batk = "Batak", Beng = "Bengali", Bhks = "Bhaiksuki", Bopo = "Bopomofo", Brah = "Brahmi", Brai = "Braille", Bugi = "Buginese", Buhd = "Buhid", Cakm = "Chakma", Cans = "Canadian Aboriginal", Cari = "Carian", Cham = "Cham", Cher = "Cherokee", Chrs = "Chorasmian", Copt = "Coptic", Cpmn = "Cypro Minoan", Cprt = "Cypriot", Cyrl = "Cyrillic", Deva = "Devanagari", Diak = "Dives Akuru", Dogr = "Dogra", Dsrt = "Deseret", Dupl = "Duployan", Egyp = "Egyptian Hieroglyphs", Elba = "Elbasan", Elym = "Elymaic", Ethi = "Ethiopic", Geor = "Georgian", Glag = "Glagolitic", Gong = "Gunjala Gondi", Gonm = "Masaram Gondi", Goth = "Gothic", Gran = "Grantha", Grek = "Greek", Gujr = "Gujarati", Guru = "Gurmukhi", Hang = "Hangul", Hani = "Han", Hano = "Hanunoo", Hatr = "Hatran", Hebr = "Hebrew", Hira = "Hiragana", Hluw = "Anatolian Hieroglyphs", Hmng = "Pahawh Hmong", Hmnp = "Nyiakeng Puachue Hmong", Hrkt = "Katakana Or Hiragana", Hung = "Old Hungarian", Ital = "Old Italic", Java = "Javanese", Kali = "Kayah Li", Kana = "Katakana", Kawi = "Kawi", Khar = "Kharoshthi", Khmr = "Khmer", Khoj = "Khojki", Kits = "Khitan Small Script", Knda = "Kannada", Kthi = "Kaithi", Lana = "Tai Tham", Laoo = "Lao", Latn = "Latin", Lepc = "Lepcha", Limb = "Limbu", Lina = "Linear A", Linb = "Linear B", Lisu = "Lisu", Lyci = "Lycian", Lydi = "Lydian", Mahj = "Mahajani", Maka = "Makasar", Mand = "Mandaic", Mani = "Manichaean", Marc = "Marchen", Medf = "Medefaidrin", Mend = "Mende Kikakui", Merc = "Meroitic Cursive", Mero = "Meroitic Hieroglyphs", Mlym = "Malayalam", Modi = "Modi", Mong = "Mongolian", Mroo = "Mro", Mtei = "Meetei Mayek", Mult = "Multani", Mymr = "Myanmar", Nagm = "Nag Mundari", Nand = "Nandinagari", Narb = "Old North Arabian", Nbat = "Nabataean", Newa = "Newa", Nkoo = "NKo", Nshu = "Nushu", Ogam = "Ogham", Olck = "Ol Chiki", Orkh = "Old Turkic", Orya = "Oriya", Osge = "Osage", Osma = "Osmanya", Ougr = "Old Uyghur", Palm = "Palmyrene", Pauc = "Pau Cin Hau", Perm = "Old Permic", Phag = "Phags Pa", Phli = "Inscriptional Pahlavi", Phlp = "Psalter Pahlavi", Phnx = "Phoenician", Plrd = "Miao", Prti = "Inscriptional Parthian", Rjng = "Rejang", Rohg = "Hanifi Rohingya", Runr = "Runic", Samr = "Samaritan", Sarb = "Old South Arabian", Saur = "Saurashtra", Sgnw = "SignWriting", Shaw = "Shavian", Shrd = "Sharada", Sidd = "Siddham", Sind = "Khudawadi", Sinh = "Sinhala", Sogd = "Sogdian", Sogo = "Old Sogdian", Sora = "Sora Sompeng", Soyo = "Soyombo", Sund = "Sundanese", Sylo = "Syloti Nagri", Syrc = "Syriac", Tagb = "Tagbanwa", Takr = "Takri", Tale = "Tai Le", Talu = "New Tai Lue", Taml = "Tamil", Tang = "Tangut", Tavt = "Tai Viet", Telu = "Telugu", Tfng = "Tifinagh", Tglg = "Tagalog", Thaa = "Thaana", Thai = "Thai", Tibt = "Tibetan", Tirh = "Tirhuta", Tnsa = "Tangsa", Toto = "Toto", Ugar = "Ugaritic", Vaii = "Vai", Vith = "Vithkuqi", Wara = "Warang Citi", Wcho = "Wancho", Xpeo = "Old Persian", Xsux = "Cuneiform", Yezi = "Yezidi", Yiii = "Yi", Zanb = "Zanabazar Square", Zinh = "Inherited", Zyyy = "Common", Zzzz = "Unknown", }, } -- Required for binary search function in [[Module:Language/scripts]]. -- Cannot get length of module loaded with mw.loadData. data.ranges.length = #data.ranges data.rtl = {} for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do -- [[Module:Lang/data]] has script codes in lowercase; -- this module has script codes with the first letter capitalized. data.rtl[script:gsub("^%a", string.upper)] = true end return data 6afbaa9e21efd3898f0ff056b5456c0cd5813400 Template:Further 10 106 286 285 2024-02-07T02:44:22Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Further]] wikitext text/x-wiki <includeonly>{{#invoke:labelled list hatnote|labelledList|Further information{{#if:{{{topic|}}}|&#32;on {{{topic|}}}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> dd29c6dfb3894a2dc3f20144a654b7012c9a9214 Template:Details 10 107 288 287 2024-02-07T02:44:23Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Details]] wikitext text/x-wiki #REDIRECT [[Template:Further]] {{Redirect category shell| {{R from merge}} }} 1a90a51d85f6cb700979ea38f5f69bee0ff2c85e Template:Hatnote 10 108 290 289 2024-02-07T02:44:23Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Hatnote]] wikitext text/x-wiki <includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 4a1d1028d07c9056022807a96051e1c82cf2a1c7 Template:TOC right 10 109 292 291 2024-02-07T02:44:24Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:TOC_right]] wikitext text/x-wiki <templatestyles src="Template:TOC_right/styles.css" />{{#if:{{{limit|}}}|<templatestyles src="Template:TOC limit/styles.css" />}}<!-- --><div class="tocright {{#if:{{{clear|}}}|tocright-clear-{{{clear|}}}}} {{#if:{{{limit|}}}|toclimit-{{{limit}}}}}" {{#if:{{{width|{{{1|}}}}}}|style="width: {{{width|{{{1}}}}}};"}}>__TOC__</div><noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 67c60b46e441afa40d8c4c1227aa6580a0cda2e9 Template:TOC right/styles.css 10 110 294 293 2024-02-07T02:44:24Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:TOC_right/styles.css]] sanitized-css text/css /* {{pp-template}} */ /* The TOC is hidden on Minerva (mobile skin) for width < 720px so must also hide this wrapper */ @media all and (max-width: 720px) { body.skin-minerva .tocright { display: none; } .tocright { width: 100% !important; /* fix the inline width while at small resolution */ } } @media all and (min-width: 720px) { .tocright { float: right; clear: right; width: auto; margin: 0 0 0.5em 1em; } .tocright-clear-left { clear: left; } .tocright-clear-both { clear: both; } .tocright-clear-none { clear: none; } } 60435a52ddabf7eb321fa80dbf78c0d63d13f95b Template:Category link 10 111 296 295 2024-02-07T02:44:24Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Category_link]] wikitext text/x-wiki {{#ifeq:{{#titleparts:{{PAGENAME}}|1}}|Stub types for deletion |[[:Category:{{{1}}}|Cat:{{{1}}}]] | [[:Category:{{{1}}}|{{{2|Category:{{{1}}}}}}]]{{#ifeq:{{Yesno|{{{count|no}}}}}|yes|<small> {{#ifexpr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}>={{{backlog|{{#expr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}+1}}}}}|<span style="font-weight: bold; color: #DD0000;">}}(&thinsp;{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}}}&thinsp;){{#ifexpr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}>={{{backlog|{{#expr:{{PAGESINCAT:{{{1}}}|{{UC:{{{count_type|ALL}}}}}|R}}+1}}}}}|</span>}}</small>}}}}<noinclude> {{Documentation}} </noinclude> cb0fcaeb8242d1d37c27a8dcb57f76fe5b5faa36 Template:Cl 10 112 298 297 2024-02-07T02:44:25Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Cl]] wikitext text/x-wiki #REDIRECT [[Template:Category link]] {{R from move}} f79fddc38797fc163b6e6ddeb4377afbea7d0cfc Module:Nihongo 828 113 300 299 2024-02-07T02:44:25Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Nihongo]] Scribunto text/plain require('strict'); --[[--------------------------< E R R O R _ M E S S A G E S >-------------------------------------------------- error messaging; keys to this table are the template base names: 'nihongo', 'nihongo3', 'nihongo krt', 'nihongo foot' → 'nihongo' etc ]] local err_msg = { ['nihongo'] = 'Japanese or romaji text required', ['hanyu'] = 'Chinese or pinyin text required', } local err_cat = { ['nihongo'] = '[[Category:Nihongo template errors]]', ['hanyu'] = '[[Category:Hanyu template errors]]', } --[[--------------------------< C O N F I G U R A T I O N >---------------------------------------------------- configuration setting for the various templates. keys to this table are the template names without spacing ]] local cfg = { ['nihongo'] = { tag = 'ja', system = 'hepburn', system_link = '[[Hepburn romanization|Hepburn]]', err_msg = err_msg.nihongo, err_cat = err_cat.nihongo, }, ['nihongo3'] = { tag = 'ja', system = 'hepburn', err_msg = err_msg.nihongo, err_cat = err_cat.nihongo, }, ['nihongo krt'] = { tag = 'ja', system = 'hepburn', err_msg = err_msg.nihongo, err_cat = err_cat.nihongo, }, ['nihongo foot'] = { tag = 'ja', system = 'hepburn', system_link = '[[Hepburn romanization|Hepburn]]', err_msg = err_msg.nihongo, err_cat = err_cat.nihongo, }, ['hanyu'] = { tag = 'zh', system = 'pinyin', system_link = '[[Pinyin]]', err_msg = err_msg.hanyu, err_cat = err_cat.hanyu, }, ['hanyu3'] = { tag = 'zh', system = 'pinyin', err_msg = err_msg.hanyu, err_cat = err_cat.hanyu, }, ['hanyu hrt'] = { tag = 'zh', system = 'pinyin', err_msg = err_msg.hanyu, err_cat = err_cat.hanyu, }, ['hanyu foot'] = { tag = 'zh', system = 'pinyin', system_link = '[[Pinyin]]', err_msg = err_msg.hanyu, err_cat = err_cat.hanyu, }, } --[[--------------------------< E R R O R _ M E S S A G E >---------------------------------------------------- Creates an error message for {{nihongo}}, {{nihongo3}}, {{nihongo krt}}, and {{nihongo foot}} when these template are missing <japanese> or <romaji> inputs; names the offending template, links to template page, and adds article to Category:Nihongo template errors ]] local function error_message (template) local msg = {'<span class="error" style="font-size:100%">error: {{'}; table.insert (msg, template); table.insert (msg, '}}: '); table.insert (msg, cfg[template].err_msg); table.insert (msg, ' ([[Template:'); table.insert (msg, template); table.insert (msg, '|help]])</span>'); if 0 == mw.title.getCurrentTitle().namespace then table.insert (msg, cfg[template].err_cat); end return table.concat (msg); end --[[--------------------------< R E N D E R E R >-------------------------------------------------------------- Shared support function for nihingo(), nihongo3(), and nihongo_foot(). Calculates an index into formatting{} from set/unset parameters: args[1] (english text) has a value of 8 (set) or 0 (unset) args[2] (native text) has a value of 4 args[3] (romanized text) has a value of 2 args[4] (extra) has a value of 1 index, the sum of these values, gets the appropriate format string from formatting{} table with associated values from the formatting[index][2] table ]] local function renderer (args, formatting, extra2) local output; local index = 0; -- index into formatting{} local param_weight = {8, 4, 2, 1}; -- binary parameter weights: [1] = english (8), [2] = japanese (4), [3] = romaji (2), [4] = extra (1) for i=1, 5 do -- spin through args[1] – args[4] index = index + (args[i] and param_weight[i] or 0); -- calculate an index into formatting{} end output = (0 ~= index) and string.format (formatting[index][1] and formatting[index][1], formatting[index][2][1], formatting[index][2][2], formatting[index][2][3], formatting[index][2][4]) or nil; if extra2 then -- always just attached to the end (if there is an end) so not part of formatting{} output = output and (output .. ' ' .. extra2) or '<5p4n>' .. extra2; -- <5p4n> and </5p4n>: place holders for font-weight style spans; akin to stripmarkers, to be replaced end -- (nihongo and nihongo3) or removed (nihongo foot) return output and (output .. '</5p4n>') or ''; -- where there is output, add secret tag close end --[[--------------------------< R O M A N I Z E D _ K E R N >-------------------------------------------------- Add kerning when first or last character of romanized text contacts adjacent opening or closing paranthesis In this example, without kerning, the romanized characters 'j' and 'V' are italicized so will contact the parentheses (<i lang=\"ja-Latn\" title=\"Hepburn transliteration\">jV</i>) <ret_string> is the formatted template output (except that the magic string '<5p4n>' has not yet been replaced) <romanized> is the return from lang_module._transl() so is not wrapped in parentheses ]] local function romanized_kern (ret_string, romanized) if not romanized or ('' == romanized) then -- if romanized not set return ret_string; -- then we're done end local romanized_text = romanized:gsub ('%b<>', ''):gsub ('\'\'+', ''):gsub ('%[%[', ''):gsub ('%]%]', ''); -- strip html tags romanized = romanized:gsub ('([%(%)%.%%%+%-%*%?%[%^%$%]])', '%%%1'); -- escape lua pattern characters local romanized_has_leading_paren = ret_string:match ('%(' .. romanized); -- has a value if (<romanized>; nil else local romanized_has_trailing_paren = ret_string:match (romanized .. '%)'); -- has a value if <romanized>); nil else local kern_lead_pattern = '^[jpy]'; -- list of characters that when italicized contact unitalicized leading parenthesis local kern_tail_pattern = '[dfijkltCEFHIJKMNPR-Z\'"%?!%]]$'; -- list of characters that when italicized contact unitalicized trailing parenthesis local kern_right = '<span style="margin-right:.09em">(</span>%1'; -- %1 is <romanized> capture local kern_left = '%1<span style="margin-left:.09em">)</span>'; -- %1 is <romanized> capture if romanized_has_leading_paren and romanized_text:match (kern_lead_pattern) then ret_string = ret_string:gsub ('%((' .. romanized .. ')', kern_right); -- replace plain '(' with kerned '('; <romanized> included here to ensure that the correct '(' is kerned end if romanized_has_trailing_paren and romanized_text:match (kern_tail_pattern) then ret_string = ret_string:gsub ('(' .. romanized .. ')%)', kern_left); -- replace plain ')' with kerned ')'; <romanized> included here to ensure that the correct ')' is kerned end return ret_string; -- done end --[[--------------------------< C O M M O N >------------------------------------------------------------------ Common support for {{nihongo}} and {{hanyu}} render order: is translated (English), native, romanized <template> is used to select the appropriate cfg table ]] local function common (frame, template) local lang_module = require ('Module:Lang' .. (frame:getTitle():match ('/sandbox') or '')); -- if this module is the sandbox, use Module:lang/sandbox; Module:Lang else local args = require ('Module:Arguments').getArgs (frame); local english, native, romanized, extra, extra2 = args[1], args[2], args[3], args.extra or args[4], args.extra2 or args[5]; -- meaningful names args[4] = extra or args[4]; -- ensure that extra is 'positional' for use by renderer() local lead = 'yes' == args.lead; -- make boolean if not (native or romanized) then -- not present, return an error message return error_message (template); end if native then native = lead and lang_module._lang_xx_inherit ({['code']=cfg[template].tag, native, ['template']=template}) or lang_module._lang ({cfg[template].tag, native, ['template']=template}); -- add ja script with/without language prefix end if romanized then romanized = (lead and english and (cfg[template].system_link .. ': ') or '') .. lang_module._transl ({'ja', cfg[template].system, romanized}) or nil; end local formatting = { -- <5p4n> and </5p4n>: place holders for font-weight style spans; akin to stripmarkers, replaced before function returns {'<5p4n>(%s)', {extra}}, -- 1 - (extra) {'%s<5p4n>', {romanized}}, -- 2 - romanized {'%s<5p4n> (%s)', {romanized, extra}}, -- 3 - romanized (extra) {'<5p4n>(%s)', {native}}, -- 4 - native {'<5p4n>(%s, %s)', {native, extra}}, -- 5 - (native, extra) {'%s<5p4n> (%s)', {romanized, native}}, -- 6 - romanized (native) {'%s<5p4n> (%s, %s)', {romanized, native, extra}}, -- 7 - romanized (native, extra) {'%s<5p4n>', {english}}, -- 8 - english {'%s<5p4n> (%s)', {english, extra}}, -- 9 - english (extra) {'%s<5p4n> (%s)', {english, romanized}}, -- 10 - english (romanized) {'%s<5p4n> (%s, %s)', {english, romanized, extra}}, -- 11 - english (romanized, extra) {'%s<5p4n> (%s)', {english, native}}, -- 12 - english (native) {'%s<5p4n> (%s, %s)', {english, native, extra}}, -- 13 - english (native, extra) {'%s<5p4n> (%s, %s)', {english, native, romanized}}, -- 14 - english (native, romanized) {'%s<5p4n> (%s, %s, %s)', {english, native, romanized, extra}}, -- 15 - english (native, romanized, extra) } local ret_string = renderer (args, formatting, extra2) ret_string = romanized_kern (ret_string, romanized); -- kern romanized text when appropriate ret_string = ret_string:gsub ('<5p4n>', '<span style="font-weight: normal">'):gsub ('</5p4n>', '</span>'); -- replace 'secret' tags with proper tags return ret_string; -- because gsub returns the number of replacements made as second return value end --[[--------------------------< C O M M O N _ R O M A N I Z E D _ N A T I V E _ T R A N S L A T E D >---------- Common support for {{nihongo3}} and {{hanyu3}} render order: is romanized, native, translated (English) <template> is used to select the appropriate cfg table ]] local function common_romanized_native_translated (frame, template) local lang_module = require ('Module:Lang' .. (frame:getTitle():match ('/sandbox') or '')); -- if this module is the sandbox, use Module:lang/sandbox; Module:Lang else local args = require ('Module:Arguments').getArgs (frame); local english, native, romanized, extra, extra2 = args[1], args[2], args[3], args.extra or args[4], args.extra2 or args[5]; -- meaningful names args[4] = extra or args[4]; -- ensure that extra is 'positional' for use by renderer() if not (native or romanized) then -- not present, return an error message return error_message (template); end native = native and lang_module._lang ({cfg[template].tag, native}) or nil; romanized = romanized and lang_module._transl ({cfg[template].tag, cfg[template].system, romanized}) or nil; local formatting = { -- <5p4n> and </5p4n>: place holders for font-weight style spans; akin to stripmarkers, replaced before function returns {'<5p4n>(%s)', {extra}}, -- 1 - (extra) {'%s<5p4n>', {romanized}}, -- 2 - romanized {'%s<5p4n> (%s)', {romanized, extra}}, -- 3 - romanized (extra) {'<5p4n>(%s)', {native}}, -- 4 - native {'<5p4n>(%s, %s)', {native, extra}}, -- 5 - (native, extra) {'%s<5p4n> (%s)', {romanized, native}}, -- 6 - romanized (native) {'%s<5p4n> (%s, %s)', {romanized, native, extra}}, -- 7 - romanized (native, extra) {'%s<5p4n>', {english}}, -- 8 - english {'%s<5p4n> (%s)', {english, extra}}, -- 9 - english (extra) {'%s<5p4n> (%s)', {romanized, english}}, -- 10 - romanized (english) {'%s<5p4n> (%s, %s)', {romanized, english, extra}}, -- 11 - romanized (english, extra) {'%s<5p4n> (%s)', {english, native}}, -- 12 - english (native) {'%s<5p4n> (%s, %s)', {english, native, extra}}, -- 13 - english (native, extra) {'%s<5p4n> (%s, %s)', {romanized, native, english}}, -- 14 - romanized (native, english) {'%s<5p4n> (%s, %s, %s)', {romanized, native, english, extra}}, -- 15 - romanized (native, english, extra) } local ret_string = renderer (args, formatting, extra2) ret_string = ret_string:gsub ('<5p4n>', '<span style="font-weight: normal">'):gsub ('</5p4n>', '</span>'); -- replace 'secret' tags with proper tags return ret_string; -- because gsub returns the number of replacements made as second return value end --[[--------------------------< C O M M O N _ N A T I V E _ R O M A N I Z E D _ T R A N S L A T E D >---------- Common support for {{nihongo krt}} and {{hanyu krt}} render order: is native, romanized, translated (English) <template> is used to select the appropriate cfg table ]] local function common_native_romanized_translated (frame, template) local lang_module = require ('Module:Lang' .. (frame:getTitle():match ('/sandbox') or '')); -- if this module is the sandbox, use Module:lang/sandbox; Module:Lang else local args = require ('Module:Arguments').getArgs (frame); local english, native, romanized, extra, extra2 = args[1], args[2], args[3], args.extra or args[4], args.extra2 or args[5]; -- meaningful names args[4] = extra or args[4]; -- ensure that extra is 'positional' for use by renderer() if not (native or romanized) then -- not present, return an error message return error_message (template); end native = native and lang_module._lang ({cfg[template].tag, native}) or nil; romanized = romanized and lang_module._transl ({cfg[template].tag, cfg[template].system, romanized}) or nil; local formatting = { -- <5p4n> and </5p4n>: place holders for font-weight style spans; akin to stripmarkers, replaced before function returns {'<5p4n>(%s)', {extra}}, -- 1 - (extra) {'%s<5p4n>', {romanized}}, -- 2 - romanized {'%s<5p4n> (%s)', {romanized, extra}}, -- 3 - romanized (extra) {'<5p4n>%s', {native}}, -- 4 - native {'<5p4n>%s (%s)', {native, extra}}, -- 5 - native (extra) {'<5p4n>%s (%s)', {native, romanized}}, -- 6 - native (romanized) {'<5p4n>%s (%s, %s)', {native, romanized, extra}}, -- 7 - native (romanized, extra) {'%s<5p4n>', {english}}, -- 8 - english {'%s<5p4n> (%s)', {english, extra}}, -- 9 - english (extra) {'%s<5p4n> (%s)', {romanized, english}}, -- 10 - romanized (english) {'%s<5p4n> (%s, %s)', {romanized, english, extra}}, -- 11 - romanized (english, extra) {'<5p4n>%s (%s)', {native, english}}, -- 12 - native (english) {'<5p4n>%s (%s, %s)', {native, english, extra}}, -- 13 - native (english, extra) {'<5p4n>%s (%s, %s)', {native, romanized, english}}, -- 14 - native (romanized, english) {'<5p4n>%s (%s, %s, %s)', {native, romanized, english, extra}}, -- 15 - native (romanized, english, extra) } local ret_string = renderer (args, formatting, extra2) ret_string = romanized_kern (ret_string, romanized); -- kern romanized text when appropriate ret_string = ret_string:gsub ('<5p4n>', '<span style="font-weight: normal">'):gsub ('</5p4n>', '</span>'); -- replace 'secret' tags with proper tags return ret_string; -- because gsub returns the number of replacements made as second return value end --[[--------------------------< C O M M O N _ F O O T >-------------------------------------------------------- Common support for {{nihongo foot}} and {{hanyu foot}} render order: is English<ref>native, romanized</ref> <template> is used to select the appropriate cfg table ]] local function common_foot (frame, template) local lang_module = require ('Module:Lang' .. (frame:getTitle():match ('/sandbox') or '')); -- if this module is the sandbox, use Module:lang/sandbox; Module:Lang else local args = require ('Module:Arguments').getArgs (frame); local english, native, romanized, extra, extra2 = args[1], args[2], args[3], args.extra or args[4], args.extra2 or args[5]; -- meaningful names args[4] = extra or args[4]; -- ensure that extra is 'positional' for use by renderer() local post = args[6] or args.post; local group = args.group; local ref_name = args.ref_name local lead = 'yes' == args.lead; -- make boolean if not (native or romanized) then -- not present, return an error message return error_message (template); end if native then native = lead and lang_module._lang_xx_inherit ({['code']=cfg[template].tag, native}) or lang_module._lang ({cfg[template].tag, native}); -- add ja script with/without language prefix end if romanized then romanized = (lead and (cfg[template].system_link .. ': ') or '') .. lang_module._transl ({'ja', cfg[template].system, romanized}) or nil; end local formatting = { {'%s', {extra}}, -- 1 - extra {'%s', {romanized}}, -- 2 - romanized {'%s, %s', {romanized, extra}}, -- 3 - romanized, extra {'%s', {native}}, -- 4 - native {'%s, %s', {native, extra}}, -- 5 - native, extra {'%s, %s', {native, romanized}}, -- 6 - native romanized {'%s, %s, %s', {native, romanized, extra}}, -- 7 - native romanized, extra -- from here english is used in the mapping but not rendered by renderer so not included in the table {'', {''}}, -- 8 - english {'%s', {extra}}, -- 9 - extra {'%s', {romanized}}, -- 10 - romanized {'%s, %s', {romanized, extra}}, -- 11 - romanized, extra {'%s', {native}}, -- 12 - native {'%s, %s', {native, extra}}, -- 13 - native, extra {'%s, %s', {native, romanized}}, -- 14 - native romanized {'%s, %s, %s', {native, romanized, extra}}, -- 15 - native romanized, extra } if english and post then -- rewrite english to include |post= english = english .. post; -- if english has a value append post else just post elseif post then english = post; -- english not set, use post elseif not english then -- neither are set english = ''; -- make english an empty string for concatenation end if native or romanized or extra or extra2 then -- no ref tag when none of these are set (it would be empty) local content = renderer (args, formatting, extra2); content = content:gsub ('<5p4n>', ''):gsub ('</5p4n>$', '', 1); -- strip secret <5p4n> and </5p4n> tags added by renderer(); spans not used by this template return english .. frame:extensionTag ({name='ref', args={group=group, name=ref_name}, content=content}); -- english with attached reference tag else return english; -- nothing to be inside ref tag so just return english end end --[=[-------------------------< N I H O N G O >---------------------------------------------------------------- Implement {{nihongo}} using Module:Lang for language and transliteration markup {{Nihongo|<English>|<japanese>|<romaji>|<extra>|<extra2>|lead=yes}} <English>, <japanese>, and <romaji> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <japanese>: Japanese language text using Japanese script; TODO: require? <romaji>: Hepburn romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Hepburn romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> |lead=: takes one value 'yes'; renders language name same as {{lang-ja}} but also adds [[Hepburn romanization|Hepburn]]:<space> ahead of the romanization; TODO: in Module:Lang, turnoff tooltip for transl when |lead=yes ]=] local function nihongo (frame) return common (frame, 'nihongo') end --[=[-------------------------< N I H O N G O 3 >-------------------------------------------------------------- Implement {{nihongo3}} using Module:Lang for language and transliteration markup Similar to {{nihongo}} but changes rendered order and does not support |lead= {{Nihongo3|<English>|<japanese>|<romaji>|<extra>|<extra2>}} <English>, <japanese>, and <romaji> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <japanese>: Japanese language text using Japanese script; TODO: require? <romaji>: Hepburn romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Hepburn romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> ]=] local function nihongo3 (frame) return common_romanized_native_translated (frame, 'nihongo3') end --[=[-------------------------< N I H O N G O _ K R T >-------------------------------------------------------- Implement {{nihongo krt}} using Module:Lang for language and transliteration markup Similar to {{nihongo}} but changes rendered order and does not support |lead= {{Nihongo krt|<English>|<japanese>|<romaji>|<extra>|<extra2>}} <English>, <japanese>, and <romaji> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <japanese>: Japanese language text using Japanese script; TODO: require? <romaji>: Hepburn romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Hepburn romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> ]=] local function nihongo_krt (frame) return common_native_romanized_translated (frame, 'nihongo krt') end --[=[-------------------------< N I H O N G O _ F O O T >------------------------------------------------------ Implement {{nihongo_foot}} using Module:Lang for language and transliteration markup {{Nihongo foot|<English>|<japanese>|<romaji>|<extra>|<extra2>|<post>|lead=yes|group}} <English>, <japanese>, and <romaji> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <japanese>: Japanese language text using Japanese script; TODO: require? <romaji>: Hepburn romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Hepburn romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> <post> is positional or named: |post= is a postscript character preceding the <ref>..</ref> tag (after <English>) |lead=: takes one value 'yes'; renders language name same as {{lang-ja}} but also adds [[Hepburn romanization|Hepburn]]:<space> ahead of the romanization; TODO: in Module:Lang, turnoff tooltip for transl when |lead=yes in the live template |lead= also adds the Help:Installing Japanese character sets link; this is not supported in this code (nihongo nor nihongo3 have this support) |group=: the group attribute in <ref group="..."> and in {{reflist}} ]=] local function nihongo_foot (frame) return common_foot (frame, 'nihongo foot') end --[=[-------------------------< H A N Y U >-------------------------------------------------------------------- Implement {{hanyu}} using Module:Lang for language and transliteration markup {{hanyu|<English>|<chinese>|<pinyin>|<extra>|<extra2>|lead=yes}} <English>, <chinese>, and <pinyin> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <chinese>: Chinese language text using Chinese script; TODO: require? <pinyin>: Pinyin romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Pinyin romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> |lead=: takes one value 'yes'; renders language name same as {{lang-zh}} but also adds [[Pinyin]]:<space> ahead of the romanization; TODO: in Module:Lang, turnoff tooltip for transl when |lead=yes ]=] local function hanyu (frame) return common (frame, 'hanyu') end --[=[-------------------------< H A N Y U 3 >------------------------------------------------------------------ Implement {{hanyu3}} using Module:Lang for language and transliteration markup Similar to {{hanyu}} but changes rendered order and does not support |lead= {{hanyu3|<English>|<chinese>|<pinyin>|<extra>|<extra2>}} <English>, <chinese>, and <pinyin> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <chinese>: Chinese language text using Chinese script; TODO: require? <pinyin>: Pinyin romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Pinyin romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> ]=] local function hanyu3 (frame) return common_romanized_native_translated (frame, 'hanyu3') end --[=[-------------------------< H A N Y U _ H R T >------------------------------------------------------------ Implement {{hanyu hrt}} using Module:Lang for language and transliteration markup Similar to {{hanyu}} but changes rendered order and does not support |lead= {{hanyu krt|<English>|<chinese>|<pinyin>|<extra>|<extra2>}} <English>, <chinese>, and <pinyin> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <chinese>: Chinese language text using Chinese script; TODO: require? <pinyin>: Pinyin romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Pinyin romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> ]=] local function hanyu_hrt (frame) return common_native_romanized_translated (frame, 'hanyu hrt') end --[=[-------------------------< H A N Y U _ F O O T >---------------------------------------------------------- Implement {{hanyu_foot}} using Module:Lang for language and transliteration markup {{hanyu foot|<English>|<chinese>|<pinyin>|<extra>|<extra2>|<post>|lead=yes|group}} <English>, <chinese>, and <pinyin> are positional parameters <English>: rendered as presented; purports to be English translation of <kanji/kana> <chinese>: Chinese language text using Chinese script; TODO: require? <pinyin>: Pinyin romanization (transliteration); TODO: in Module:Lang/data change tooltip text to 'Pinyin romanization'? <extra> and <extra2> are positional or named: |extra= and |extra2=; mixing can be problematic <extra> is rendered as presented preceeded with <comma><space> <extra2> is rendered as presented preceeded with <space> <post> is positional or named: |post= is a postscript character preceding the <ref>..</ref> tag (after <English>) |lead=: takes one value 'yes'; renders language name same as {{lang-zh}} but also adds [[Pinyin]]:<space> ahead of the romanization; TODO: in Module:Lang, turnoff tooltip for transl when |lead=yes in the live template |lead= also adds the Help:Installing Chinese character sets link; this is not supported in this code (hanyu nor hanyu3 have this support) |group=: the group attribute in <ref group="..."> and in {{reflist}} ]=] local function hanyu_foot (frame) return common_foot (frame, 'hanyu foot') end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { nihongo = nihongo, nihongo3 = nihongo3, nihongokrt = nihongo_krt, -- TODO: rename function name in {{#invoke}} to use nihongo_krt; delete this line nihongo_krt = nihongo_krt, nihongo_foot = nihongo_foot, hanyu = hanyu, hanyu3 = hanyu3, hanyu_hrt = hanyu_hrt, hanyu_foot = hanyu_foot, } 7ad11952c5404f68ef3dc04de743da59f35238c9 Template:Notice 10 114 302 301 2024-02-07T02:44:26Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Notice]] wikitext text/x-wiki {{Mbox | name = Notice | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = notice | image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice|alt={{{imagealt|}}}]]}} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice|alt={{{imagealt|}}}]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}<noinclude> {{Documentation}} </noinclude> 2cbdbb721ca517005f6827650eef5b0f17537a43 Template:Lit 10 115 304 303 2024-02-07T02:44:26Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Lit]] wikitext text/x-wiki #REDIRECT [[Template:Literal translation]] 38b4e908291ac0a1fa8482ed0f8d5631c6a213e6 Template:Var 10 116 306 305 2024-02-07T02:44:28Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Var]] wikitext text/x-wiki <var {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-right: 1px;{{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</var><noinclude> <!--Categories and interwikis go near the bottom of the /doc page.--> {{Documentation}} </noinclude> 0e9e47694c01ca4c7b29566a1cb11a117dfbf2c0 Template:Template link code 10 117 308 307 2024-02-07T02:44:28Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_link_code]] wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlc}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 044f00ca1bfc10cb967c32e893043ccc6f739764 Template:Tlp 10 118 310 309 2024-02-07T02:44:29Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Tlp]] wikitext text/x-wiki #REDIRECT [[Template:Template link with parameters]] {{R from move}} 3867e4ef4fe637ce8530859b5486b23e916d0b8a Template:Template link with parameters 10 119 312 311 2024-02-07T02:44:29Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_link_with_parameters]] wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlp}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 8fe73a6eea633360a927820d10469b7292bfc1c2 Template:Tld 10 120 314 313 2024-02-07T02:44:30Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Tld]] wikitext text/x-wiki #REDIRECT [[Template:Template link code]] be5d6275ea41d83224503e05901f3405c82141f7 Template:TOCright 10 121 316 315 2024-02-07T02:44:30Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:TOCright]] wikitext text/x-wiki #REDIRECT [[Template:TOC right]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} f20e461364ddb55d5f46a9e77871e34208173664 Module:High-use 828 60 318 317 2024-02-07T02:44:32Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:High-use]] Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return "a very large number of" else return "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) if frame.args[1] == "risk" then return "risk" else local count = _fetch(frame) if count and count >= 100000 then return "risk" end end return "" end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise and not mw.title.getCurrentTitle().isRedirect then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p e22649bbbdf0185575aade09174113873db5066a Template:Clc 10 122 320 319 2024-02-07T02:44:33Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Clc]] wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Template:COinS safe 10 123 322 321 2024-02-07T02:44:34Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:COinS_safe]] wikitext text/x-wiki {{notice |image={{#ifeq: {{{1|}}}|n|Stop hand nuvola.svg}} |{{#ifeq: {{{1|}}}|n |This template should not be used in citation templates such as [[Help:Citation Style 1|Citation Style 1]] and [[Help:Citation Style 2|Citation Style 2]], because it includes markup that will pollute the [[COinS]] metadata they produce; see [[Wikipedia:COinS]]. {{{addtext|}}}{{Sandbox other||[[Category:Templates not safe for use in citation templates]]}} |This template is safe for use in citation templates that produce [[COinS]] metadata; see [[Wikipedia:COinS]]. If HTML or other markup is added, then the template must be reevaluated. {{{addtext|}}} }} }}<noinclude> {{Documentation}} <!-- Please add categories to the /doc subpage, and interwikis at Wikidata (see Wikipedia:Wikidata) --> </noinclude> 47abee673d74440d28e801111bf6ee765cd998df Template:TemplateDataHeader 10 124 324 323 2024-02-07T02:44:34Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:TemplateDataHeader]] wikitext text/x-wiki #REDIRECT [[Template:TemplateData header]] {{R from move}} 61e461016bcb3a0a6fc4d8aea35d590298c19630 Module:Transclusion count/data/N 828 125 326 325 2024-02-07T02:44:35Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Transclusion_count/data/N]] Scribunto text/plain return { ["N"] = 2700, ["N.b."] = 2100, ["N/A"] = 25000, ["N/a"] = 57000, ["NA-Class"] = 15000, ["NASTRO_comment"] = 31000, ["NBA_Draft_template_list"] = 3400, ["NBA_Year"] = 5700, ["NBA_color"] = 3600, ["NBA_color_cell"] = 4300, ["NBA_color_cell2"] = 3400, ["NBA_player_statistics_legend"] = 4700, ["NBA_player_statistics_start"] = 3900, ["NBbox"] = 3400, ["NCAA_color_cell"] = 11000, ["NCAA_secondary_color_cell"] = 4400, ["NCES_District_ID"] = 2600, ["NED"] = 9800, ["NEXTYEAR"] = 8000, ["NFLAltPrimaryStyle"] = 2300, ["NFLPrimaryStyle"] = 27000, ["NFLSecondaryColor"] = 18000, ["NFL_Roster_navbox_template_list"] = 2500, ["NFL_Year"] = 24000, ["NFL_predraft"] = 6600, ["NFL_predraft/check"] = 6600, ["NFL_predraft/ftin"] = 6600, ["NFLplayer"] = 2100, ["NFT"] = 6900, ["NFT_player"] = 31000, ["NGA"] = 3200, ["NGR"] = 2400, ["NHLE"] = 19000, ["NHLS_url"] = 2200, ["NLD"] = 11000, ["NLM_content"] = 2800, ["NOINDEX"] = 457000, ["NOMIS2011"] = 2300, ["NOR"] = 9500, ["NPG_name"] = 2100, ["NRDB_species"] = 7000, ["NRHP-PA"] = 2600, ["NRHPGoogleMapFootnote"] = 2500, ["NRHP_Focus"] = 73000, ["NRHP_color"] = 3700, ["NRHP_date_for_lists"] = 3100, ["NRHP_date_for_lists/dates"] = 3100, ["NRHP_header"] = 3400, ["NRHP_navigation_box"] = 8400, ["NRHP_row"] = 3400, ["NRHP_style"] = 70000, ["NRHP_url"] = 29000, ["NRHP_url/core"] = 31000, ["NRISref"] = 73000, ["NSWcity"] = 2100, ["NSWcity/core"] = 2100, ["NYCS_br"] = 2700, ["NYCS_time_2"] = 3100, ["NZL"] = 6800, ["NZ_electorate_link"] = 2400, ["Na"] = 2600, ["Nac"] = 2900, ["Namespace_detect"] = 569000, ["Namespace_detect_showall"] = 7700, ["Nastaliq"] = 11000, ["Nat_fs_end"] = 2500, ["National_Film_Awards/style"] = 2100, ["National_Heritage_List_for_England"] = 23000, ["National_Rail_style"] = 5700, ["National_Register_of_Historic_Places"] = 29000, ["National_Register_of_Historic_Places_in_Massachusetts"] = 4400, ["National_Register_of_Historic_Places_in_New_York"] = 5600, ["National_Register_of_Historic_Places_in_North_Carolina"] = 2900, ["National_Register_of_Historic_Places_in_Pennsylvania"] = 3200, ["National_Register_of_Historic_Places_in_Virginia"] = 3100, ["National_basketball_squad"] = 3200, ["National_field_hockey_squad"] = 4100, ["National_football_squad_end"] = 3000, ["National_football_squad_start/styles.css"] = 2400, ["National_rugby_union_team"] = 4300, ["National_squad"] = 42000, ["National_squad_no_numbers"] = 17000, ["National_volleyball_team"] = 2300, ["Native_name"] = 20000, ["Native_name_checker"] = 82000, ["Naval"] = 3400, ["Naval/core"] = 3400, ["Navbar"] = 38000, ["Navbar-collapsible"] = 3400, ["Navbar-header"] = 16000, ["Navbar-header/styles.css"] = 16000, ["Navbox"] = 2900000, ["Navbox_GR_munic"] = 3500, ["Navbox_Musical_artist"] = 9900, ["Navbox_bottom"] = 15000, ["Navbox_decade_list"] = 11000, ["Navbox_documentation"] = 34000, ["Navbox_ice_hockey"] = 3200, ["Navbox_musical_artist"] = 224000, ["Navbox_musical_artist/color"] = 224000, ["Navbox_rugby_league_squad"] = 4900, ["Navbox_season_by_team"] = 3200, ["Navbox_top"] = 15000, ["Navbox_visibility"] = 34000, ["Navbox_with_collapsible_groups"] = 136000, ["Navbox_with_collapsible_sections"] = 2400, ["Navbox_with_columns"] = 26000, ["Navboxes"] = 57000, ["Navboxes_colour"] = 4700, ["Navseasoncats"] = 229000, ["Navseasoncats_with_centuries_below_decade"] = 6800, ["Navseasoncats_with_decades_below_year"] = 16000, ["Navsource"] = 2500, ["Navy"] = 20000, ["Navy/core"] = 20000, ["Nay"] = 5900, ["Nbay"] = 5600, ["Nbhyph"] = 192000, ["Nbsp"] = 495000, ["Nbsp_to_space"] = 21000, ["Ndash"] = 22000, ["Nee"] = 10000, ["NeilBrownPlayers"] = 3100, ["New_user_bar"] = 57000, ["Newbot"] = 4200, ["Next_period"] = 22000, ["Nfly"] = 2200, ["Nihongo"] = 104000, ["Nihongo2"] = 12000, ["Nihongo_foot"] = 2700, ["No"] = 8900, ["No."] = 14000, ["No2"] = 11000, ["NoSpam"] = 3900, ["NoSpamEmail"] = 17000, ["No_col_break"] = 2300, ["No_col_break/styles.css"] = 2400, ["No_documentation"] = 2500, ["No_footnotes"] = 51000, ["No_ping"] = 382000, ["No_plot"] = 8300, ["No_redirect"] = 595000, ["No_spam"] = 317000, ["No_wrap"] = 2900, ["Nobold"] = 398000, ["Nobold/styles.css"] = 398000, ["Nobr"] = 5200, ["Nobreak"] = 669000, ["Nochange"] = 2600, ["Noindex"] = 4800, ["Noitalic"] = 4600, ["Noitalic/styles.css"] = 4600, ["Nom"] = 43000, ["Nominated"] = 7700, ["Non-English-language_text_category"] = 2700, ["Non-admin_closure"] = 3100, ["Non-admin_closure_(requested_moves)"] = 4600, ["Non-admin_comment"] = 2000, ["Non-album_single"] = 2000, ["Non-diffusing_subcategory"] = 16000, ["Non-free_2D_art"] = 7500, ["Non-free_3D_art"] = 2500, ["Non-free_album_cover"] = 212000, ["Non-free_audio_sample"] = 8500, ["Non-free_biog-pic"] = 27000, ["Non-free_book_cover"] = 56000, ["Non-free_character"] = 2500, ["Non-free_comic"] = 11000, ["Non-free_fair_use"] = 17000, ["Non-free_fair_use_in"] = 14000, ["Non-free_file_with_no_commercial_use_license"] = 2400, ["Non-free_film_poster"] = 27000, ["Non-free_film_screenshot"] = 5000, ["Non-free_game_cover"] = 8000, ["Non-free_game_screenshot"] = 4900, ["Non-free_historic_image"] = 16000, ["Non-free_image_data"] = 8400, ["Non-free_image_rationale"] = 9500, ["Non-free_logo"] = 157000, ["Non-free_magazine_cover"] = 7700, ["Non-free_media"] = 753000, ["Non-free_media_data"] = 9600, ["Non-free_media_rationale"] = 11000, ["Non-free_movie_poster"] = 25000, ["Non-free_newspaper_image"] = 2100, ["Non-free_poster"] = 81000, ["Non-free_promotional"] = 8800, ["Non-free_school_logo"] = 7400, ["Non-free_seal"] = 5800, ["Non-free_symbol"] = 5700, ["Non-free_television_screenshot"] = 16000, ["Non-free_title-card"] = 6200, ["Non-free_use_rationale"] = 518000, ["Non-free_use_rationale/styles.css"] = 706000, ["Non-free_use_rationale_2"] = 210000, ["Non-free_use_rationale_album_cover"] = 145000, ["Non-free_use_rationale_biog"] = 2100, ["Non-free_use_rationale_book_cover"] = 19000, ["Non-free_use_rationale_logo"] = 107000, ["Non-free_use_rationale_poster"] = 54000, ["Non-free_use_rationale_title-card"] = 3200, ["Non-free_use_rationale_video_cover"] = 6100, ["Non-free_use_rationale_video_game_cover"] = 11000, ["Non-free_video_cover"] = 16000, ["Non-free_video_game_cover"] = 22000, ["Non-free_video_game_cover/platform"] = 21000, ["Non-free_video_game_screenshot"] = 11000, ["Non-free_video_game_screenshot/platform"] = 9900, ["Non-free_with_NC"] = 2400, ["Non-free_with_permission"] = 2000, ["Non_breaking_hyphen"] = 192000, ["Nonumtoc"] = 2800, ["Nonumtoc/styles.css"] = 2800, ["Noping"] = 370000, ["Noprint"] = 2900, ["Noredirect"] = 8400, ["Normal"] = 6200, ["Normalwraplink"] = 4500, ["North_America_topic"] = 3600, ["Nospam"] = 26000, ["Not-PD-US-expired-min-year"] = 25000, ["Not_a_ballot"] = 7900, ["Not_a_forum"] = 7800, ["Not_a_typo"] = 12000, ["Not_around"] = 6500, ["Not_done"] = 20000, ["Notability"] = 61000, ["Notavote"] = 2200, ["Notdone"] = 5600, ["Note"] = 25000, ["NoteFoot"] = 4400, ["NoteTag"] = 4500, ["Note_label"] = 9100, ["Notelist"] = 205000, ["Notelist-lr"] = 3700, ["Notelist-ua"] = 7300, ["Notes"] = 5600, ["Noteslist"] = 3500, ["Notice"] = 116000, ["NovelsWikiProject"] = 8300, ["Nowiki_="] = 2300, ["Nowrap"] = 1500000, ["Np"] = 3400, ["Npby"] = 2500, ["Nq"] = 4100, ["Nrut"] = 4300, ["Ns"] = 2800, ["Ns0"] = 110000, ["Ns_has_subpages"] = 2510000, ["Nts"] = 21000, ["Ntsh"] = 3400, ["Number_of_defined_parameters"] = 5200, ["Number_table_sorting"] = 36000, ["Number_table_sorting_hidden"] = 3400, ["Number_to_word"] = 7600, ["Numero"] = 3700, ["Nutshell"] = 4000, ["Nw="] = 2300, ["Née"] = 2300, ["Module:Namespace_detect"] = 623000, ["Module:Namespace_detect/config"] = 4920000, ["Module:Namespace_detect/data"] = 4920000, ["Module:National_squad"] = 55000, ["Module:Native_name"] = 96000, ["Module:Navbar"] = 5520000, ["Module:Navbar/configuration"] = 5520000, ["Module:Navbar/styles.css"] = 4840000, ["Module:Navbox"] = 4530000, ["Module:Navbox/configuration"] = 4530000, ["Module:Navbox/styles.css"] = 4530000, ["Module:Navbox_ice_hockey"] = 3200, ["Module:Navbox_top_and_bottom"] = 15000, ["Module:Navbox_with_collapsible_groups"] = 146000, ["Module:Navboxes"] = 58000, ["Module:Nihongo"] = 106000, ["Module:No_ping"] = 456000, ["Module:Noinclude"] = 2100, ["Module:Ns_has_subpages"] = 2510000, ["Module:Number_table_sorting"] = 38000, } fb0d0a0c0ef9f67906607fa2dd4be9f1cb481e8f Template:Nihongo/doc 10 126 328 327 2024-02-07T02:44:36Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Nihongo/doc]] wikitext text/x-wiki {{Documentation subpage}} <!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). --> {{High-use}} {{COinS safe|n}} {{Lua|Module:Nihongo}} {{TOCright}} == Usage == This template marks the <code>[[kanji]]</code> segment as being in Japanese kanji and/or kana, which helps user agents (web browsers and so on) to display it correctly. {{details|topic=when to use this template|Wikipedia:Manual of Style (Japan-related articles)}} '''Syntax:''' {|class=wikitable |Without lead=yes |With lead=yes |- |<code><nowiki>{{Nihongo|</nowiki>&lt;{{var|english}}>&#124;&lt;{{var|kanji/kana}}>&#124;&lt;{{var|rōmaji}}>&#124;&lt;{{var|extra}}>&#124;&lt;{{var|extra2}}>}}</code> |<code><nowiki>{{Nihongo|</nowiki>&lt;{{var|english}}>&#124;&lt;{{var|kanji/kana}}>&#124;&lt;{{var|rōmaji}}>&#124;lead=yes&#124;extra=&lt;{{var|extra}}>&#124;extra2=&lt;{{var|extra2}}>}}</code> |} '''Parameters:''' * &lt;{{var|english}}>. Optional. The word as translated into English. Note that this will sometimes be the actual Japanese word due to it being adopted into English. * &lt;{{var|kanji/kana}}>. Required when &lt;{{var|rōmaji}}> is empty or omitted. The word as written using Japanese script (kanji, kana). * &lt;{{var|rōmaji}}>. Required when &lt;{{var|kanji/kana}}> is empty. Transliteration of the Japanese word, using Hepburn Romanization. * lead=yes. Optional. This should be used for the first instance of Japanese, usually in the lead. It gives the reader an idea what kind of non-English writing they are viewing. * &lt;{{var|extra}}>. Optional. Can be used to add a gloss (particularly if there is no English form). Can also be expressed as a named parameter, <code>extra=</code> * &lt;{{var|extra2}}>. Optional. Can also be expressed as a named parameter, <code>extra2=</code>. It is only useful in ";" definitions (extra2 will be displayed without bold, whereas text following the template will get the bold). === Examples === ;Regular use: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo|Tokyo Tower|東京タワー|Tōkyō tawā}}</nowiki></code> |- |'''Gives'''|| {{Nihongo|Tokyo Tower|東京タワー|Tōkyō tawā}} |} ;Use in lead: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo|Tokyo Tower|東京タワー|Tōkyō tawā|lead=yes}}</nowiki></code> |- |'''Gives'''|| {{Nihongo|Tokyo Tower|東京タワー|Tōkyō tawā|lead=yes}} |} ;Without <code>English</code>: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo||東京タワー|Tōkyō tawā}}</nowiki></code> |- |'''Gives'''|| {{Nihongo||東京タワー|Tōkyō tawā}} |} ;Without <code>English</code>, use in lead: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo||東京タワー|Tōkyō tawā|lead=yes}}</nowiki></code> |- |'''Gives'''|| {{Nihongo||東京タワー|Tōkyō tawā|lead=yes}} |} ;With <code>extra</code> to add a literal translation: {| CLASS="wikitable" |'''Code''' ||<code><nowiki>{{Nihongo|''Sokoban''|倉庫番|Sōko-ban|{{lit|warehouse keeper}}}}</nowiki></code> |- |'''Gives'''|| {{Nihongo|''Sokoban''|倉庫番|Sōko-ban|{{lit|warehouse keeper}}}} |} ;With <code>extra2</code>: {| CLASS="wikitable" |'''Code''' || <code><nowiki>; {{Nihongo||虚無僧|komusō|extra2='Priest of nothingness'}}</nowiki></code><BR /> <code><nowiki>: Mendicant priest of the Fuke sect of Zen Buddhism.</nowiki></code> |- |'''Gives'''|| ; {{Nihongo||虚無僧|komusō|extra2='Priest of nothingness'}} : Mendicant priest of the Fuke sect of Zen Buddhism. |} {{hatnote|Note: literal translations and linguistic glosses go in [[MOS:SINGLE|single quotation marks]], not double.}} ;Without <code>extra2</code>: {| CLASS="wikitable" |'''Code''' || <code><nowiki>; {{Nihongo||虚無僧|komusō}} 'Priest of nothingness'</nowiki></code><BR /> <code><nowiki>: Mendicant priest of the Fuke sect of Zen Buddhism.</nowiki></code> |- |'''Gives'''|| <!-- -->; {{Nihongo||虚無僧|komusō}} 'Priest of nothingness' <!-- -->: Mendicant priest of the Fuke sect of Zen Buddhism. |} === User style === [[Help:User style|User style]] can be set by adding code similar to <syntaxhighlight lang="css"> @media screen, tv { *[lang="ja"] { color: green; } }</syntaxhighlight> to [[Special:Mypage/common.css|common.css]]. ==Error messaging== This template emits one error message of its own: :<span class="error" style="font-size:100%">error: <nowiki>{{nihongo}}</nowiki>: Japanese or romaji text required</span> One of the positional parameters <code>&lt;{{var|kanji/kana}}></code> (<code><nowiki>{{{2}}}</nowiki></code>), the 'Japanese' referred to in the error message or <code>&lt;{{var|rōmaji}}></code> (<code><nowiki>{{{3}}}</nowiki></code>) is required for proper operation of this template. Articles with these errors are collected in {{clc|Nihongo template errors}}. This error often occurs because the template is malformed: :<code><nowiki>{{Nihongo|東京タワー}}</nowiki></code> instead of <code><nowiki>{{Nihongo||東京タワー}}</nowiki></code>; {{lang|ja|東京タワー}} is in <code><nowiki>{{{1}}}</nowiki></code> (<code>&lt;{{var|english}}></code>) instead of <code><nowiki>{{{2}}}</nowiki></code> (<code>&lt;{{var|kanji/kana}}></code>). To resolve this error, add the missing pipe (<code>|</code>) or consider using {{tlx|lang}} or {{tlx|transl}} Because this template uses {{tld|lang}} and {{tlx|transl}} which emit their own error messages, see the help text for those at: :{{cl|Lang and lang-xx template errors}} – for error messages emitted by {{tld|lang}} :{{cl|Transliteration template errors}} – for error messages emitted by {{tld|transl}} ==Limitations== This cannot be used within a Wikilink in an article or in any template or other page that is [[WP:Transclusion|transcluded]] into an article. == See also == * {{tlp|Lang-ja|...}},{{tlp|lang|ja|...}}, similar templates in the [[:Category:Lang-x templates|Lang-x template]] for marking up Japanese text * {{tl|Nihongo3}}, essentially the same as this template, but gives rōmaji first and English inside the parentheses * {{tl|Nihongo krt}}, essentially the same as this template, but gives kanji first with rōmaji and English inside the parentheses * {{tl|Nihongo foot}}, same as this version, but puts everything but the English into a footnote * {{tl|Nihongo2}}, also displays the kanji properly, but without adding anything in parentheses, without rōmaji and without the extra parameters * {{tlp|in lang|ja}}, to label sources written in Japanese * {{tl|Japanese}}, to request expert assistance with Japanese script == Template data == {{TemplateDataHeader}} <templatedata> { "description": "This template is used to display Japanese text, applying the correct code and formatting.", "params": { "1": { "label": "English text", "type": "string", "description": "The word as translated into English. Note this will sometimes be the actual Japanese word if it has been adopted into English." }, "2": { "label": "Kanji/kana text", "type": "string", "required": true, "description": "The word as written in Japanese (kanji, kana, Roman letters, and possibly other marks)." }, "3": { "label": "Romanized (rōmaji) text", "type": "string", "description": "Transliteration of the Japanese word, using Hepburn Romanization." }, "4": { "label": "Extra text inside parentheses", "type": "string", "description": "Adds extra text inside the parentheses. ", "aliases": [ "extra" ] }, "5": { "label": "Extra text outside parentheses", "type": "string", "description": "Adds extra text outside the parentheses. It is only useful in \";\" definitions (it will be displayed without bold, whereas text following the template, will be bolded). Literal translations and linguistic glosses must use single quotation marks, not double.", "aliases": [ "extra2" ] }, "lead": { "label": "Lead formatting", "type": "string", "description": "If set to yes, changes formatting style for the first instance of Japanese, usually in the lead. It gives the reader an idea what kind of non-English writing they are viewing.", "suggestedvalues": [ "yes" ] } }, "paramOrder": [ "1", "2", "3", "lead", "4", "5" ], "format": "inline" } </templatedata> <includeonly>{{Sandbox other|| <!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --> [[Category:Japonic multilingual support templates|{{PAGENAME}}]] [[Category:WikiProject Japan templates|Nihongo]] }}</includeonly> 3714173bbd073658d5f3f4d0d8b82784b815a77e Category:Articles containing Japanese-language text 14 127 330 2024-02-07T02:46:38Z Otonashi Ayana 2 Created page with "__HIDDENCAT__" wikitext text/x-wiki __HIDDENCAT__ 183b9c38bff80327776bd180634fccfd19cf616f Category:Characters 14 128 331 2024-02-07T02:46:50Z Otonashi Ayana 2 Created blank page wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Category:Playable characters 14 129 332 2024-02-07T02:46:52Z Otonashi Ayana 2 Created blank page wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 MediaWiki:Common.css 8 3 333 215 2024-02-07T02:49:25Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:black; border:1px solid white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; l 0a904460dd4813298bde6981217f0439b2f2dc87 334 333 2024-02-07T02:50:00Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc{ background:black; border:1px solid white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; l 854888e7aa917471f21cdf6e56e2274f2c3818fc 335 334 2024-02-07T02:51:11Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata .catlinks{ background:black; border:1px solid white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; l 2ad3a618f329c9f58bb66db97427fda50a887eba 338 335 2024-02-07T02:55:28Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata .catlinks{ background:black !important; border:1px solid white !important; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; l ba7c6eed5e1599c271061de16abbf50ea1a52ff1 340 338 2024-02-07T03:02:22Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .catlinks, pre{ background:black !important; border:1px solid white !important; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; l 33e339af30b9f9d51e8137cd201439f85ed6f430 341 340 2024-02-07T03:02:47Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .catlinks, pre{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; l 12b502f44354bbdc3ff5368a3d5b30f314389b37 345 341 2024-02-07T03:19:30Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .catlinks, pre{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; } 36ab6039bf7b76574bfe75dd931621563a36b924 347 345 2024-02-07T03:21:51Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .catlinks, pre{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } db617054b6882e8b5cbab513e0b345554f5735f0 349 347 2024-02-07T03:27:55Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code, pre{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } f40af20113940bf1ca376d68aab67bab5145c954 350 349 2024-02-07T03:31:11Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } 327fba764b3cf928f33f41b9043dd1b97164c382 351 350 2024-02-07T03:32:56Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; border:1px solid black; } fbac093a710f4304809fa818dcee1f1c52c47fe5 352 351 2024-02-07T03:38:05Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } 205886d73b78eca8c0a21ee5857c6f0d7b8ea51e 364 352 2024-02-07T03:58:36Z Otonashi Ayana 2 css text/css body{ background:black !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } 34178ceeac1866efdc62964a1b1a837221a56a37 371 364 2024-02-07T04:11:01Z Otonashi Ayana 2 css text/css body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } c14e25967cc6bbff0e2a28fd093eb02ad859a663 372 371 2024-02-07T04:15:29Z Otonashi Ayana 2 css text/css body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } @font-face{ font-family: Silver; src: url("https://files.catbox.moe/ti7ado.ttf") } 894340fdfe3413564ae2b7e4b9a3c70bca2e995d 373 372 2024-02-07T04:18:22Z Otonashi Ayana 2 css text/css body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } @font-face{ font-family: "Silver"; src: url("https://files.catbox.moe/ti7ado.ttf") } 64382ca6eee20f23698b182931346b9adfa6edeb 374 373 2024-02-07T04:29:44Z Otonashi Ayana 2 css text/css body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } @font-face{ font-family: "Silver"; src: url("https://files.catbox.moe/miem84.woff") format("woff"); } b27c658c4f8cb2225c847e481137b83fd2be803c 375 374 2024-02-07T04:32:05Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } @font-face{ font-family: "Silver"; src: url("https://files.catbox.moe/miem84.woff") format("woff"); } 53fb9add9358a9db6f04c86699b7d893cb6f2590 376 375 2024-02-07T04:35:15Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 21px; text-transform: uppercase; } body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } @font-face{ font-family: "Silver"; src: url("https://files.catbox.moe/miem84.woff") format("woff"); } fd262154105e56d3863052afd669a7ff389d0a25 Template:Infobox character 10 81 336 243 2024-02-07T02:53:20Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span style="font-weight:bold;font-size:1.2em">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Loadout | data5 = {{{loadout|}}} | header6 = Stats | data7 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black;text-align:center | labelstyle = vertical-align:top | imagestyle = text-align:center }} 041517ae0721f39db44e77ca20884cc4005e8482 377 336 2024-02-07T04:35:44Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span class="pixel-title">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Loadout | data5 = {{{loadout|}}} | header6 = Stats | data7 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black;text-align:center | labelstyle = vertical-align:top | imagestyle = text-align:center }} 83d409fab3f6b3001a42b00e52be187bbe3758eb Template:Woh 10 130 337 2024-02-07T02:54:29Z Otonashi Ayana 2 Created page with "''[[World of Horror]]''" wikitext text/x-wiki ''[[World of Horror]]'' 79b0bae14d5f7b72f41c1af6c9e394b5c1427f26 World of Horror 0 131 339 2024-02-07T03:00:55Z Otonashi Ayana 2 Created page with "{{nihongo|'''''World of Horror'''''|恐怖の世界|Kyōfu no Sekai}} is a roguelite horror video game created by Polish developer [[Panstasz]]. It was released into early access on February 20, 2020 through Steam, GOG, and the Microsoft Store. The full game was released in 2023, with the macOS and Windows versions releasing on October 19 and Nintendo Switch, PlayStation 4, and PlayStation 5 versions releasing on October 26." wikitext text/x-wiki {{nihongo|'''''World of Horror'''''|恐怖の世界|Kyōfu no Sekai}} is a roguelite horror video game created by Polish developer [[Panstasz]]. It was released into early access on February 20, 2020 through Steam, GOG, and the Microsoft Store. The full game was released in 2023, with the macOS and Windows versions releasing on October 19 and Nintendo Switch, PlayStation 4, and PlayStation 5 versions releasing on October 26. 46a08965923dee8ba8fed89232b456f7b46f1ec4 Main Page 0 1 342 3 2024-02-07T03:04:30Z Otonashi Ayana 2 wikitext text/x-wiki __NOTOC__ <div style="width:100%;text-align:center"><div style="display:inline-block;border:1px solid white">[[File:World of horror logo.png|link=]]</div></div> {{woh}} is a roguelite horror game inspired by the works of H.P. Lovecraft and Junji Ito. d7cdeebc11f7fa7dbde882353d34209c53cb2469 File:Item scalpel.svg 6 132 343 2024-02-07T03:08:21Z Otonashi Ayana 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Template:Infobox character/styles.css 10 82 344 241 2024-02-07T03:19:25Z Otonashi Ayana 2 sanitized-css text/css .infobox{ position:relative; width:220px; } .infobox-image img{ height:100%; width:100%; margin-bottom:-2px; } .stat-label{ display:inline-block; background:black; padding:1px; width:45px; text-align:center; } .stat-value{ display:inline-block; border:1px solid black; width:30px; border-radius:0px 4px 4px 0px; } c79840433d9961a7af6de806902791edd6d16af6 Template:Infobox item 10 133 346 2024-02-07T03:21:05Z Otonashi Ayana 2 Created page with "{{Infobox | title = {{{title}}} | image = {{{image}}} | label1 = Damage Type | data1 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label2 = Grip | data2 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label3 = Stat | data3 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label4 = Damage | data4 = {{{dmg|}}} | label5 = Speed | data5 = {{{speed|}}} | label6 = Hit Chance..." wikitext text/x-wiki {{Infobox | title = {{{title}}} | image = {{{image}}} | label1 = Damage Type | data1 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label2 = Grip | data2 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label3 = Stat | data3 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label4 = Damage | data4 = {{{dmg|}}} | label5 = Speed | data5 = {{{speed|}}} | label6 = Hit Chance | data6 = {{{hit|}}} | label7 = Throw Damage | data7 = {{{throw|}}} | label8 = Sell Price | data8 = {{#if:{{{sell|}}}|+{{{sell}}} FUNDS}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em }} 9906ec9b76755f7fd8321f143826691cad120260 348 346 2024-02-07T03:24:17Z Otonashi Ayana 2 wikitext text/x-wiki {{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | label1 = Damage Type | data1 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label2 = Grip | data2 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label3 = Stat | data3 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label4 = Damage | data4 = {{{dmg|}}} | label5 = Speed | data5 = {{{speed|}}} | label6 = Hit Chance | data6 = {{{hit|}}} | label7 = Throw Damage | data7 = {{{throw|}}} | label8 = Sell Price | data8 = {{#if:{{{sell|}}}|+{{{sell}}} FUNDS}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em }} fec032c084cc564650deaa722ce0e3274ade0584 354 348 2024-02-07T03:41:08Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | label1 = Damage Type | data1 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label2 = Grip | data2 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label3 = Stat | data3 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label4 = Damage | data4 = {{{dmg|}}} | label5 = Speed | data5 = {{{speed|}}} | label6 = Hit Chance | data6 = {{{hit|}}} | label7 = Throw Damage | data7 = {{{throw|}}} | label8 = Sell Price | data8 = {{#if:{{{sell|}}}|+{{{sell}}} FUNDS}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em }} 9f1461908d9c47bce19b6b5b7ef0c23d3fae18cd 355 354 2024-02-07T03:42:58Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Damage Type | data2 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label3 = Grip | data3 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Damage | data5 = {{{dmg|}}} | label6 = Speed | data6 = {{{speed|}}} | label7 = Hit Chance | data7 = {{{hit|}}} | label8 = Throw Damage | data8 = {{{throw|}}} | label9 = Sell Price | data9 = {{#if:{{{sell|}}}|+{{{sell}}} FUNDS}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em }} 6b7b3df9054ab5de9fe9dd9ee687ee0f21f19d82 356 355 2024-02-07T03:43:31Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Damage Type | data2 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label3 = Grip | data3 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Damage | data5 = {{{dmg|}}} | label6 = Speed | data6 = {{{speed|}}} | label7 = Hit Chance | data7 = {{{hit|}}} | label8 = Throw Damage | data8 = {{{throw|}}} | label9 = Sell Price | data9 = {{#if:{{{sell|}}}|+{{{sell}}} FUNDS}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em | headerstyle = background:black;text-align:center }} 2d71d0ff8ddc179b6e84db1877c8f68bd680671b 357 356 2024-02-07T03:45:11Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Damage Type | data2 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label3 = Grip | data3 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Damage | data5 = {{{dmg|}}} | label6 = Speed | data6 = {{{speed|}}} | label7 = Hit Chance | data7 = {{{hit|}}} | label8 = Throw Damage | data8 = {{{throw|}}} | label9 = Sell Price | data9 = {{#if:{{{sell|}}}|+{{{sell}}} [[FUNDS|FND]]}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em | headerstyle = background:black;text-align:center }} bfa69a657c2c09428b2971a461d3d03e970ec4ad 358 357 2024-02-07T03:46:17Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{uc:{{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Damage Type | data2 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label3 = Grip | data3 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Damage | data5 = {{{dmg|}}} | label6 = Speed | data6 = {{{speed|}}} | label7 = Hit Chance | data7 = {{{hit|}}} | label8 = Throw Damage | data8 = {{{throw|}}} | label9 = Sell Price | data9 = {{#if:{{{sell|}}}|+{{{sell}}} [[FUNDS|FND]]}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em | headerstyle = background:black;text-align:center }} ec004aa16e3d5608587be391ad855e68fc276f29 363 358 2024-02-07T03:56:57Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{uc:{{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Damage Type | data2 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label3 = Grip | data3 = {{#switch:{{{grip|}}} | sharp = [ONE-HANDED] | blunt = [TWO-HANDED] }} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Damage | data5 = {{{dmg|}}} | label6 = Speed | data6 = {{{speed|}}} | label7 = Hit Chance | data7 = {{{hit|}}} | label8 = Throw Damage | data8 = {{{throw|}}} | label9 = Sell Price | data9 = {{#if:{{{sell|}}}|+{{{sell}}} [[Funds|FND]]}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em | headerstyle = background:black;text-align:center }} 67088bc93a35ba6223e022c77c8e2660fb28a7d2 365 363 2024-02-07T03:59:22Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{uc:{{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Damage Type | data2 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label3 = Grip | data3 = {{#switch:{{{grip|}}} | one = [ONE-HANDED] | two = [TWO-HANDED] }} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Damage | data5 = {{{dmg|}}} | label6 = Speed | data6 = {{{speed|}}} | label7 = Hit Chance | data7 = {{{hit|}}} | label8 = Throw Damage | data8 = {{{throw|}}} | label9 = Sell Price | data9 = {{#if:{{{sell|}}}|+{{{sell}}} [[Funds|FND]]}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em | headerstyle = background:black;text-align:center }} f478cd42222b9efda89cd939fac115999431e847 378 365 2024-02-07T04:37:00Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Damage Type | data2 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label3 = Grip | data3 = {{#switch:{{{grip|}}} | one = [ONE-HANDED] | two = [TWO-HANDED] }} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Damage | data5 = {{{dmg|}}} | label6 = Speed | data6 = {{{speed|}}} | label7 = Hit Chance | data7 = {{{hit|}}} | label8 = Throw Damage | data8 = {{{throw|}}} | label9 = Sell Price | data9 = {{#if:{{{sell|}}}|+{{{sell}}} [[Funds|FND]]}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em | headerstyle = background:black;text-align:center }} ad165a4d9183caf3bba1f0d9855e7e4501b3c50a Template:Infobox item/styles.css 10 134 353 2024-02-07T03:40:43Z Otonashi Ayana 2 Created page with ".infobox{ width:250px; } .infobox-image img{ height:100%; width:100%; }" sanitized-css text/css .infobox{ width:250px; } .infobox-image img{ height:100%; width:100%; } 371af1d50f92ac7fc222c1fa01b944905db3412b Scalpel 0 135 359 2024-02-07T03:47:54Z Otonashi Ayana 2 Created page with "{{infobox item | image = item_scalpel.svg | type = sharp | grip = one | stat = knw | dmg = 4 | speed = 80 | hit = 65 | throw = 1 | sell = 1 }}The '''scalpel''' is the starting weapon of [[Mimi]]. It can also be bought from the [[Pharmacy]] for {{fnd|3}}." wikitext text/x-wiki {{infobox item | image = item_scalpel.svg | type = sharp | grip = one | stat = knw | dmg = 4 | speed = 80 | hit = 65 | throw = 1 | sell = 1 }}The '''scalpel''' is the starting weapon of [[Mimi]]. It can also be bought from the [[Pharmacy]] for {{fnd|3}}. 894088ffed70d181cdba9ff85e7cef2953587ea9 Template:Fnd 10 136 360 2024-02-07T03:48:10Z Otonashi Ayana 2 Created page with "{{{1}}} [[FUNDS|FND]]" wikitext text/x-wiki {{{1}}} [[FUNDS|FND]] 11a056231140b3a42f36e5a75b625b7e2029928b 361 360 2024-02-07T03:48:54Z Otonashi Ayana 2 wikitext text/x-wiki {{{1}}} [[Funds|FND]] a550345d69634b41024d1b2bf194a37641d4349f Funds 0 137 362 2024-02-07T03:56:30Z Otonashi Ayana 2 Created page with "'''Funds''', abbreviated as '''FND''', is the primary form of currency in {{woh}}. They can be used to buy weapons, items, spells, and even allies. The player starts every run with between 0 and 5 FND depending on difficulty. Funds can be acquired in various ways throughout any given playthrough: *Opening the figurine in the [[closet]] will provide the player with 1 FND. *The background [[The Seventh Curse]] starts the player with 4 additional FND. *Various [[events]] ca..." wikitext text/x-wiki '''Funds''', abbreviated as '''FND''', is the primary form of currency in {{woh}}. They can be used to buy weapons, items, spells, and even allies. The player starts every run with between 0 and 5 FND depending on difficulty. Funds can be acquired in various ways throughout any given playthrough: *Opening the figurine in the [[closet]] will provide the player with 1 FND. *The background [[The Seventh Curse]] starts the player with 4 additional FND. *Various [[events]] can provide FND. *The [[Shovel]] has a small chance to provide FND after combat. While the player can lose FND through failing events, it is impossible to have negative FND. If the player investigates with 0 FND then there is a chance to trigger the [[Out of Funds]] event. 073e9d4b983174095f3a240692622054737e701c File:Status mimi's obsession.svg 6 138 366 2024-02-07T04:04:07Z Otonashi Ayana 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Template:Infobox status/styles.css 10 139 367 2024-02-07T04:06:38Z Otonashi Ayana 2 Created page with ".infobox{ width:250px; } .infobox-image img{ height:100%; width:100%; }" sanitized-css text/css .infobox{ width:250px; } .infobox-image img{ height:100%; width:100%; } 371af1d50f92ac7fc222c1fa01b944905db3412b Template:Infobox status 10 140 368 2024-02-07T04:06:58Z Otonashi Ayana 2 Created page with "<templatestyles src="Infobox status/styles.css" />{{Infobox | title = {{uc:{{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}}}} | image = [[File:{{{image|}}}]] | label2 = Effect | data2 = {{{effect}}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em }}" wikitext text/x-wiki <templatestyles src="Infobox status/styles.css" />{{Infobox | title = {{uc:{{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}}}} | image = [[File:{{{image|}}}]] | label2 = Effect | data2 = {{{effect}}} | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em }} 4900dcacc4786d11c0f98894305aeb8c4beee107 379 368 2024-02-07T04:37:11Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox status/styles.css" />{{Infobox | title = {{uc:{{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}}}} | image = [[File:{{{image|}}}]] | label2 = Effect | data2 = {{{effect}}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0;font-weight:bold;font-size:1.2em }} 6e78c3bfd10870c6e270f7b31c6a01a591c655ac 380 379 2024-02-07T04:37:45Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox status/styles.css" />{{Infobox | title = {{uc:{{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}}}} | image = [[File:{{{image|}}}]] | label2 = Effect | data2 = {{{effect}}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0 }} e5ccd546bc1e47c299d778e35ed6ba814795645b Mimi's Obsession 0 141 369 2024-02-07T04:07:49Z Otonashi Ayana 2 Created page with "{{Infobox status | image = status_mimi's obsession.svg | effect = -20% Max Reason }}" wikitext text/x-wiki {{Infobox status | image = status_mimi's obsession.svg | effect = -20% Max Reason }} cd2784d690050332ad3ec046a9e9e67b91a33214 370 369 2024-02-07T04:09:54Z Otonashi Ayana 2 wikitext text/x-wiki {{Infobox status | image = status_mimi's obsession.svg | effect = -20% Max Reason }}'''Mimi's Obsession''' is a [[status]] exclusive to [[Mimi]] which reduces maximum [[Reason]] by 20%. The only way to remove the status is using the [[Old Coin]], which is given to a player with the [[Curious Birthmark]] backstory. 16acf22bb809fc8aaf49b9da8f042cb837ca6516 Template:Infobox item 10 133 381 378 2024-02-07T04:37:58Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Damage Type | data2 = {{#switch:{{{type|}}} | sharp = [SHARP] | blunt = [BLUNT] }} | label3 = Grip | data3 = {{#switch:{{{grip|}}} | one = [ONE-HANDED] | two = [TWO-HANDED] }} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Damage | data5 = {{{dmg|}}} | label6 = Speed | data6 = {{{speed|}}} | label7 = Hit Chance | data7 = {{{hit|}}} | label8 = Throw Damage | data8 = {{{throw|}}} | label9 = Sell Price | data9 = {{#if:{{{sell|}}}|+{{{sell}}} [[Funds|FND]]}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0 | headerstyle = background:black;text-align:center }} e32eec5324c707684487af9c13d7e86f98feed0b MediaWiki:Common.css 8 3 382 376 2024-02-07T04:45:17Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } @font-face{ font-family: "Silver"; src: url("https://files.catbox.moe/miem84.woff") format("woff"); } ba9ac5d2c58ed28118aa4af38c5ab0794cef8c11 383 382 2024-02-07T04:45:43Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid black; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid white; pointer-events:none; } 8dab6b95707037557c2df820a7d4113d484b50a8 384 383 2024-02-07T04:51:09Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a.new{ color:rgb(192,0,192); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } 4b89bedb02d39b36e0ef31d1b63cf059d5a7dfd8 385 384 2024-02-07T04:55:44Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a{ color:rgb(109,131,155); } a.visited{ color:rgb(60,118,130); } a.new{ color:rgb(105,58,68); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } e796b314c79c9c50a4b335b22aa1b0bb92ee566d 386 385 2024-02-07T04:57:43Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a{ color:rgb(109,131,155); } a.visited{ color:rgb(60,118,130); } a.new{ color:rgb(105,58,68); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } /* search bar */ .vector-feature-zebra-design-disabled .vector-header-container{ background:black; color:white; border-bottom:1px solid white; } .vector-feature-zebra-design-disabled .vector-header-container .vector-icon{ filter:invert(100%); } 731d9f413b99e66669fa19f0d7c1e9d91d31f918 387 386 2024-02-07T04:58:23Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a{ color:rgb(109,131,155); } a:visited{ color:rgb(60,118,130); } a.new{ color:rgb(105,58,68); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } /* search bar */ .vector-feature-zebra-design-disabled .vector-header-container{ background:black; color:white; border-bottom:1px solid white; } .vector-feature-zebra-design-disabled .vector-header-container .vector-icon{ filter:invert(100%); } c5be6c43337daf05b874668b3eabca390664b831 389 387 2024-02-07T05:08:06Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a{ color:rgb(109,131,155); } a:visited{ color:rgb(60,118,130); } a.new{ color:rgb(105,58,68); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } .vector-feature-zebra-design-disabled #vector-toc-pinned-container .vector-toc::after{ background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,255)); } /* search bar */ .vector-feature-zebra-design-disabled .vector-header-container{ background:black; color:white; border-bottom:1px solid white; } .vector-feature-zebra-design-disabled .vector-header-container .vector-icon{ filter:invert(100%); } 7dbac02b790d606c63ef7ac5e1ec04c69ff86f2c 407 389 2024-02-07T05:54:34Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a{ color:rgb(109,131,155); } a:visited{ color:rgb(60,118,130); } a.new{ color:rgb(105,58,68); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .vector-feature-zebra-design-disabled .vector-toc, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } .vector-feature-zebra-design-disabled #vector-toc-pinned-container .vector-toc::after{ background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,255)); } /* search bar */ .vector-feature-zebra-design-disabled .vector-header-container{ background:black; color:white; border-bottom:1px solid white; } .vector-feature-zebra-design-disabled .vector-header-container .vector-icon{ filter:invert(100%); } @keyframes glitch{ 2%,64%{ transform: translate(2px,0) skew(0deg); } 4%,60%{ transform: translate(-2px,0) skew(0deg); } 62%{ transform: translate(0,0) skew(5deg); } } @keyframes glitchTop{ 2%,64%{ transform: translate(2px,-2px); } 4%,60%{ transform: translate(-2px,2px); } 62%{ transform: translate(13px,-1px) skew(-13deg); } } @keyframes glitchBotom{ 2%,64%{ transform: translate(-2px,0); } 4%,60%{ transform: translate(-2px,0); } 62%{ transform: translate(-22px,5px) skew(21deg); } } f448bacfbe26c12f2b40f9a366f93703d1149dd5 416 407 2024-02-07T06:56:41Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a{ color:rgb(109,131,155); } a:visited{ color:rgb(60,118,130); } a.new{ color:rgb(105,58,68); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled .vector-toc{ background:black; } .vector-feature-zebra-design-disabled.client-js.vector-sticky-header-enabled.vector-feature-toc-pinned-clientpref-1 #vector-toc-pinned-container{ border:1px solid white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } .vector-feature-zebra-design-disabled #vector-toc-pinned-container .vector-toc::after{ background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,255)); } /* search bar */ .vector-feature-zebra-design-disabled .vector-header-container{ background:black; color:white; border-bottom:1px solid white; } .vector-feature-zebra-design-disabled .vector-header-container .vector-icon{ filter:invert(100%); } @keyframes glitch{ 2%,64%{ transform: translate(2px,0) skew(0deg); } 4%,60%{ transform: translate(-2px,0) skew(0deg); } 62%{ transform: translate(0,0) skew(5deg); } } @keyframes glitchTop{ 2%,64%{ transform: translate(2px,-2px); } 4%,60%{ transform: translate(-2px,2px); } 62%{ transform: translate(13px,-1px) skew(-13deg); } } @keyframes glitchBotom{ 2%,64%{ transform: translate(-2px,0); } 4%,60%{ transform: translate(-2px,0); } 62%{ transform: translate(-22px,5px) skew(21deg); } } c39daaf5fe80052dffd764a3fe5776491969561c 422 416 2024-02-07T21:22:37Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } a, .vector-menu-tabs .mw-list-item a{ color:rgb(109,131,155); } a:visited{ color:rgb(60,118,130); } a.new, .vector-menu-tabs .mw-list-item.new a, .vector-menu-tabs .mw-list-item.new a:visited{ color:rgb(105,58,68); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled .vector-toc{ background:black; } .vector-feature-zebra-design-disabled.client-js.vector-sticky-header-enabled.vector-feature-toc-pinned-clientpref-1 #vector-toc-pinned-container{ border:1px solid white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } .vector-feature-zebra-design-disabled #vector-toc-pinned-container .vector-toc::after{ background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,255)); } /* search bar */ .vector-feature-zebra-design-disabled .vector-header-container{ background:black; color:white; border-bottom:1px solid white; } .vector-feature-zebra-design-disabled .vector-header-container .vector-icon{ filter:invert(100%); } @keyframes glitch{ 2%,64%{ transform: translate(2px,0) skew(0deg); } 4%,60%{ transform: translate(-2px,0) skew(0deg); } 62%{ transform: translate(0,0) skew(5deg); } } @keyframes glitchTop{ 2%,64%{ transform: translate(2px,-2px); } 4%,60%{ transform: translate(-2px,2px); } 62%{ transform: translate(13px,-1px) skew(-13deg); } } @keyframes glitchBotom{ 2%,64%{ transform: translate(-2px,0); } 4%,60%{ transform: translate(-2px,0); } 62%{ transform: translate(-22px,5px) skew(21deg); } } d6607ecdc84dfe1f385f539864fc66e02617d4a3 424 422 2024-02-08T00:05:59Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } .mw-page-container{ border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; } a, .vector-menu-tabs .mw-list-item a{ color:rgb(109,131,155); } a:visited{ color:rgb(60,118,130); } a.new, .vector-menu-tabs .mw-list-item.new a, .vector-menu-tabs .mw-list-item.new a:visited{ color:rgb(105,58,68); } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled .vector-toc{ background:black; } .vector-feature-zebra-design-disabled.client-js.vector-sticky-header-enabled.vector-feature-toc-pinned-clientpref-1 #vector-toc-pinned-container{ border:1px solid white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } .vector-feature-zebra-design-disabled #vector-toc-pinned-container .vector-toc::after{ background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,255)); } /* search bar */ .vector-feature-zebra-design-disabled .vector-header-container{ background:black; color:white; border-bottom:1px solid white; } .vector-feature-zebra-design-disabled .vector-header-container .vector-icon{ filter:invert(100%); } @keyframes glitch{ 2%,64%{ transform: translate(2px,0) skew(0deg); } 4%,60%{ transform: translate(-2px,0) skew(0deg); } 62%{ transform: translate(0,0) skew(5deg); } } @keyframes glitchTop{ 2%,64%{ transform: translate(2px,-2px); } 4%,60%{ transform: translate(-2px,2px); } 62%{ transform: translate(13px,-1px) skew(-13deg); } } @keyframes glitchBotom{ 2%,64%{ transform: translate(-2px,0); } 4%,60%{ transform: translate(-2px,0); } 62%{ transform: translate(-22px,5px) skew(21deg); } } b6ca44bdf7fa161582b885efd619cbeb8c95a48a 428 424 2024-02-08T00:10:51Z Otonashi Ayana 2 css text/css @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); .pixel-title{ font-family: 'VT323', monospace; font-size: 28px; text-transform: uppercase; } body{ background:black !important; } .mw-page-container{ border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; } a, .vector-menu-tabs .mw-list-item a{ color:rgb(109,131,155); } a:visited{ color:rgb(60,118,130); } a.new, .vector-menu-tabs .mw-list-item.new a, .vector-menu-tabs .mw-list-item.new a:visited{ color:rgb(105,58,68); } .catlinks a{ color:white; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu, .mw-parser-output .documentation, .mw-parser-output .documentation-metadata, .mw-parser-output .ombox, .managewiki-search-highlight, .catlinks, code{ background:black !important; border:1px solid white !important; color:white; } .vector-feature-zebra-design-disabled .vector-toc{ background:black; } .vector-feature-zebra-design-disabled.client-js.vector-sticky-header-enabled.vector-feature-toc-pinned-clientpref-1 #vector-toc-pinned-container{ border:1px solid white; } .vector-feature-zebra-design-disabled body, .vector-menu-tabs .mw-list-item.selected a, .vector-menu-tabs .mw-list-item.selected a:visited, .vector-feature-zebra-design-disabled .vector-pinnable-header-label, .vector-feature-zebra-design-disabled .vector-pinnable-element .vector-menu-heading, .vector-feature-zebra-design-disabled .vector-dropdown-content .vector-menu-heading, .oo-ui-labelWidget.oo-ui-inline-help, .cdx-button:enabled, .cdx-button.cdx-button--fake-button--enabled, .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6{ color: white; } .mw-page-container{ background:rgb(49,49,49) !important; } .vector-feature-zebra-design-disabled #vector-main-menu-pinned-container .vector-main-menu{ background:transprent; } .infobox { /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ text-align: left; font-size: 88%; line-height: 1.5em; position:relative; border:1px solid white; } .infobox:before{ content:""; display:block; position:absolute; top:-2px; bottom:-2px; left:-2px; right:-2px; border:1px solid black; pointer-events:none; } .vector-feature-zebra-design-disabled #vector-toc-pinned-container .vector-toc::after{ background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,255)); } /* search bar */ .vector-feature-zebra-design-disabled .vector-header-container{ background:black; color:white; border-bottom:1px solid white; } .vector-feature-zebra-design-disabled .vector-header-container .vector-icon{ filter:invert(100%); } @keyframes glitch{ 2%,64%{ transform: translate(2px,0) skew(0deg); } 4%,60%{ transform: translate(-2px,0) skew(0deg); } 62%{ transform: translate(0,0) skew(5deg); } } @keyframes glitchTop{ 2%,64%{ transform: translate(2px,-2px); } 4%,60%{ transform: translate(-2px,2px); } 62%{ transform: translate(13px,-1px) skew(-13deg); } } @keyframes glitchBotom{ 2%,64%{ transform: translate(-2px,0); } 4%,60%{ transform: translate(-2px,0); } 62%{ transform: translate(-22px,5px) skew(21deg); } } 4cca67fb1e59e5970ecae82ab5dcfffc5ac82689 Characters 0 142 388 2024-02-07T05:06:22Z Otonashi Ayana 2 Created page with "== Playable characters == {{woh}} includes 14 playable characters. == Allies == == Old Gods == == Enemies ==" wikitext text/x-wiki == Playable characters == {{woh}} includes 14 playable characters. == Allies == == Old Gods == == Enemies == e30a2d40e2465f38db3927bb2b9753d3b1356710 File:Select6 mimi.png 6 143 390 2024-02-07T05:21:11Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select7 miku.png 6 144 391 2024-02-07T05:21:12Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select8 moriko.png 6 145 392 2024-02-07T05:21:13Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select9 yashiro.png 6 146 393 2024-02-07T05:21:15Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select10 ayaka.png 6 147 394 2024-02-07T05:21:16Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select11 toshiaki.png 6 148 395 2024-02-07T05:21:18Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select12 juri.png 6 149 396 2024-02-07T05:21:19Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select13 yumiko.png 6 150 397 2024-02-07T05:21:21Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select14.png 6 151 398 2024-02-07T05:21:23Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select1 kirie.png 6 152 399 2024-02-07T05:21:24Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select2 aiko.png 6 153 400 2024-02-07T05:21:25Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select3 haru.png 6 154 401 2024-02-07T05:21:28Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select4 mizuki.png 6 155 402 2024-02-07T05:21:29Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 File:Select5 kouji.png 6 156 403 2024-02-07T05:21:31Z Otonashi Ayana 2 File uploaded with MsUpload wikitext text/x-wiki File uploaded with MsUpload a655f04485ff507c02499d137d22a0d3e0ea32c2 Template:Character select 10 157 404 2024-02-07T05:29:31Z Otonashi Ayana 2 Created page with "<div style="display:inline-flex;flex-direction:column;border:1px solid white;border-radius:4px"> <div>[[File:{{{image}}}]]</div> <span style="font-family:'VT323',monospace;font-size:21px;text-transform:uppercase;text-align:center">{{{name}}}</span> </div>" wikitext text/x-wiki <div style="display:inline-flex;flex-direction:column;border:1px solid white;border-radius:4px"> <div>[[File:{{{image}}}]]</div> <span style="font-family:'VT323',monospace;font-size:21px;text-transform:uppercase;text-align:center">{{{name}}}</span> </div> e7eb84cbcb0e3313fc43b2d76a2e10d7c16d12be 405 404 2024-02-07T05:30:50Z Otonashi Ayana 2 wikitext text/x-wiki <div style="display:inline-flex;flex-direction:column;border:1px solid white;border-radius:4px;align-items:center"> <div>[[File:{{{image}}}]]</div> <span style="font-family:'VT323',monospace;font-size:21px;text-transform:uppercase">{{{name}}}</span> </div> c846b26f544428025f1061c0cd850e0f76fb04da 406 405 2024-02-07T05:31:23Z Otonashi Ayana 2 wikitext text/x-wiki <div style="display:inline-flex;flex-direction:column;border:1px solid white;border-radius:4px;align-items:center"> <div>[[File:{{{image}}}]]</div> <div style="font-family:'VT323',monospace;font-size:21px;text-transform:uppercase">{{{name}}}</div> </div> be3858c8ad6e954634e2e7380aa7fc7bd4cd2ada 408 406 2024-02-07T05:57:11Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Character select/styles.css" /><div style="display:inline-flex;flex-direction:column;border:1px solid white;border-radius:4px;align-items:center"> <div>[[File:{{{image}}}]]</div> <div style="font-family:'VT323',monospace;font-size:21px;text-transform:uppercase" {{#if:{{{glitch|}}}|class="glitch"}}>{{{name}}}</div> </div> faf06118d6a5102a0ea96b0a8172ea6f4c97b95a 413 408 2024-02-07T06:15:50Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Character select/styles.css" /><div style="display:inline-flex;flex-direction:column;border:1px solid white;border-radius:4px;align-items:center"> <div>[[File:{{{image}}}]]</div> <div style="font-family:'VT323',monospace;font-size:21px;text-transform:uppercase;height:1.6em" {{#if:{{{glitch|}}}|class="glitch"}}>{{{name}}}</div> </div> 8dfeb0e1107143e45e3041fc7a92e564e43c8f96 415 413 2024-02-07T06:21:36Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Character select/styles.css" /><div style="display:inline-flex;flex-direction:column;border:1px solid white;border-radius:4px;align-items:center;justify-content:end"> <div>[[File:{{{image}}}]]</div> <div style="font-family:'VT323',monospace;font-size:21px;text-transform:uppercase;height:1.6em" {{#if:{{{glitch|}}}|class="glitch"}}>{{{name}}}</div> </div> 9aadfa7ca8ddb8bfa302e412f541bc452adb32c0 425 415 2024-02-08T00:07:15Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Character select/styles.css" /><div style="display:inline-flex;flex-direction:column;border:1px solid white;border-radius:4px;align-items:center;justify-content:end"> <div>[[File:{{{image}}}|link={{{link}}}]]</div> <div style="font-family:'VT323',monospace;font-size:21px;text-transform:uppercase;height:1.6em" {{#if:{{{glitch|}}}|class="glitch"}}>[[{{{link}}}|{{{name}}}]]</div> </div> b31edc41fbd642bb9df638709fc9be44b4f3b922 Template:Character select/styles.css 10 158 409 2024-02-07T06:00:23Z Otonashi Ayana 2 Created page with ".glitch{ animation: glitch 1s linear infinite; } .glitch:before, .glitch:after{ content:"Hidden"; position: absolute; left: 0; } .glitch:before{ animation: glitchTop 1s linear infinite; clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); } .glitch:after{ animation: glitchBotom 1.5s linear infinite; clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); }" sanitized-css text/css .glitch{ animation: glitch 1s linear infinite; } .glitch:before, .glitch:after{ content:"Hidden"; position: absolute; left: 0; } .glitch:before{ animation: glitchTop 1s linear infinite; clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); } .glitch:after{ animation: glitchBotom 1.5s linear infinite; clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); } c4eeb8bef201da5646bac656da02c5b1e1f82218 412 409 2024-02-07T06:14:26Z Otonashi Ayana 2 sanitized-css text/css .glitch{ animation: glitch 1s linear infinite; } .glitch:before, .glitch:after{ content:"Hidden"; position: absolute; left: 0; } .glitch:before{ animation: glitchTop 1s linear infinite; clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); } .glitch:after{ animation: glitchBotom 1.5s linear infinite; clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); } .select-grid img{ width:100%; height:100%; object-fit:none; } 576de9ee94ca4f63be8be0b42d34462167af5527 414 412 2024-02-07T06:21:03Z Otonashi Ayana 2 sanitized-css text/css .glitch{ animation: glitch 1s linear infinite; } .glitch:before, .glitch:after{ content:"Hidden"; position: absolute; left: 0; } .glitch:before{ animation: glitchTop 1s linear infinite; clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); } .glitch:after{ animation: glitchBotom 1.5s linear infinite; clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); } .select-grid img{ width:100%; object-fit:none; } b1375a9a6ce089ca3df08654ba10c206804bbd62 Main Page 0 1 410 342 2024-02-07T06:02:16Z Otonashi Ayana 2 wikitext text/x-wiki __NOTOC__ <div style="width:100%;text-align:center"><div style="display:inline-block;border:1px solid white">[[File:World of horror logo.png|link=]]</div></div> {{woh}} is a roguelite horror game inspired by the works of H.P. Lovecraft and Junji Ito. == Characters == <div style="display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;text-align:center"> {{character select|image=select1_kirie.png|name=Kirie}} {{character select|image=select2_aiko.png|name=Aiko}} {{character select|image=select3_haru.png|name=Haru}} {{character select|image=select4_mizuki.png|name=Mizuki}} {{character select|image=select5_kouji.png|name=Kouji}} {{character select|image=select6_mimi.png|name=Mimi}} {{character select|image=select7_miku.png|name=Miku}} {{character select|image=select8_moriko.png|name=Moriko}} {{character select|image=select9_yashiro.png|name=Yashiro}} {{character select|image=select10_ayaka.png|name=Ayaka}} {{character select|image=select11_toshiaki.png|name=Toshiaki}} {{character select|image=select12_juri.png|name=Juri}} {{character select|image=select13_yumiko.png|name=Yumiko}} {{character select|image=select14.png|name=Hidden|glitch=y}} </div> 5070a0b58768cf0c8781eb16d7f884029ac2b0eb 411 410 2024-02-07T06:14:09Z Otonashi Ayana 2 wikitext text/x-wiki __NOTOC__ <div style="width:100%;text-align:center"><div style="display:inline-block;border:1px solid white">[[File:World of horror logo.png|link=]]</div></div> {{woh}} is a roguelite horror game inspired by the works of H.P. Lovecraft and Junji Ito. == Characters == <div style="display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;text-align:center" class="select-grid"> {{character select|image=select1_kirie.png|name=Kirie}} {{character select|image=select2_aiko.png|name=Aiko}} {{character select|image=select3_haru.png|name=Haru}} {{character select|image=select4_mizuki.png|name=Mizuki}} {{character select|image=select5_kouji.png|name=Kouji}} {{character select|image=select6_mimi.png|name=Mimi}} {{character select|image=select7_miku.png|name=Miku}} {{character select|image=select8_moriko.png|name=Moriko}} {{character select|image=select9_yashiro.png|name=Yashiro}} {{character select|image=select10_ayaka.png|name=Ayaka}} {{character select|image=select11_toshiaki.png|name=Toshiaki}} {{character select|image=select12_juri.png|name=Juri}} {{character select|image=select13_yumiko.png|name=Yumiko}} {{character select|image=select14.png|name=Hidden|glitch=y}} </div> bd53228028df1ebd14d049ee3a0bee483f408477 423 411 2024-02-07T21:28:36Z Otonashi Ayana 2 wikitext text/x-wiki __NOTOC__ <div style="width:100%;text-align:center"><div style="display:inline-block;border:1px solid white">[[File:World of horror logo.png|link=]]</div></div><br> <div style="text-align:center">{{woh}} is a roguelite horror game inspired by the works of H.P. Lovecraft and Junji Ito.<br> {{uc:[The city of Shiokawa, Japan. 198X] Something strange is happening in our town...}}</div> == Characters == <div style="display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;text-align:center" class="select-grid"> {{character select|image=select1_kirie.png|name=Kirie}} {{character select|image=select2_aiko.png|name=Aiko}} {{character select|image=select3_haru.png|name=Haru}} {{character select|image=select4_mizuki.png|name=Mizuki}} {{character select|image=select5_kouji.png|name=Kouji}} {{character select|image=select6_mimi.png|name=Mimi}} {{character select|image=select7_miku.png|name=Miku}} {{character select|image=select8_moriko.png|name=Moriko}} {{character select|image=select9_yashiro.png|name=Yashiro}} {{character select|image=select10_ayaka.png|name=Ayaka}} {{character select|image=select11_toshiaki.png|name=Toshiaki}} {{character select|image=select12_juri.png|name=Juri}} {{character select|image=select13_yumiko.png|name=Yumiko}} {{character select|image=select14.png|name=Hidden|glitch=y}} </div> 53fc8b073e5603922216925034c4843c38c312ad 426 423 2024-02-08T00:08:37Z Otonashi Ayana 2 wikitext text/x-wiki __NOTOC__ <div style="width:100%;text-align:center"><div style="display:inline-block;border:1px solid white">[[File:World of horror logo.png|link=]]</div></div><br> <div style="text-align:center">{{woh}} is a roguelite horror game inspired by the works of H.P. Lovecraft and Junji Ito.<br> {{uc:[The city of Shiokawa, Japan. 198X] Something strange is happening in our town...}}</div> == Characters == <div style="display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;text-align:center" class="select-grid"> {{character select|image=select1_kirie.png|name=Kirie|link=Kirie Minami}} {{character select|image=select2_aiko.png|name=Aiko Takashi}} {{character select|image=select3_haru.png|name=Haru}} {{character select|image=select4_mizuki.png|name=Mizuki Hamasaki}} {{character select|image=select5_kouji.png|name=Kouji Tagawa}} {{character select|image=select6_mimi.png|name=Mimi}} {{character select|image=select7_miku.png|name=Miku}} {{character select|image=select8_moriko.png|name=Moriko Ishii}} {{character select|image=select9_yashiro.png|name=Yashiro Kawaji}} {{character select|image=select10_ayaka.png|name=Ayaka Kuroi}} {{character select|image=select11_toshiaki.png|name=Toshiaki Wakamatsu}} {{character select|image=select12_juri.png|name=Juri Okusawa}} {{character select|image=select13_yumiko.png|name=Yumiko Ichimura}} {{character select|image=select14.png|name=Hidden|glitch=y|link=Kana}} </div> 4230560a2e2141e13f9d7a779576f449e8124230 427 426 2024-02-08T00:10:01Z Otonashi Ayana 2 wikitext text/x-wiki __NOTOC__ <div style="width:100%;text-align:center"><div style="display:inline-block;border:1px solid white">[[File:World of horror logo.png|link=]]</div></div><br> <div style="text-align:center">{{woh}} is a roguelite horror game inspired by the works of H.P. Lovecraft and Junji Ito.<br> {{uc:[The city of Shiokawa, Japan. 198X] Something strange is happening in our town...}}</div> == Characters == <div style="display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;text-align:center" class="select-grid"> {{character select|image=select1_kirie.png|name=Kirie|link=Kirie Minami}} {{character select|image=select2_aiko.png|name=Aiko|link=Aiko Takashi}} {{character select|image=select3_haru.png|name=Haru|link=Haru}} {{character select|image=select4_mizuki.png|name=Mizuki|link=Mizuki Hamasaki}} {{character select|image=select5_kouji.png|name=Kouji|link=Kouji Tagawa}} {{character select|image=select6_mimi.png|name=Mimi|link=Mimi}} {{character select|image=select7_miku.png|name=Miku|link=Miku}} {{character select|image=select8_moriko.png|name=Moriko|link=Moriko Ishii}} {{character select|image=select9_yashiro.png|name=Yashiro|link=Yashiro Kawaji}} {{character select|image=select10_ayaka.png|name=Ayaka|link=Ayaka Kuroi}} {{character select|image=select11_toshiaki.png|name=Toshiaki|link=Toshiaki Wakamatsu}} {{character select|image=select12_juri.png|name=Juri|link=Juri Okusawa}} {{character select|image=select13_yumiko.png|name=Yumiko|link=Yumiko Ichimura}} {{character select|image=select14.png|name=Hidden|glitch=y|link=Kana}} </div> f9fe147aa25c17546f736f729e8fe5e1de10eed1 Mimi 0 85 417 329 2024-02-07T07:27:33Z Otonashi Ayana 2 wikitext text/x-wiki {{Infobox character | name = Mimi | image = char6_mimi.png | title = Med Student | age = 22 | sex = Female | loadout = [[Scalpel]]<br>[[Mimi's Obsession]] | str = 6 | dex = 5 | per = 7 | knw = 8 | chr = 7 }}{{nihongo|'''Mimi'''|美々}} is an unlockable [[Playable characters|playable character]] in {{woh}}. She is unlocked by earning the [[World Saved II]] achievement. [[Category:Playable characters]] [[Category:Characters]] 57ad8b0261cd43f61707233f161d82af12e92e81 429 417 2024-02-08T00:12:40Z Otonashi Ayana 2 wikitext text/x-wiki {{Infobox character | name = Mimi | image = char6_mimi.png | title = Med Student | age = 22 | sex = Female | loadout = [[Scalpel]]<br>[[Mimi's Obsession]] | prep = [[Anatomy Book]] | str = 6 | dex = 5 | per = 7 | knw = 8 | chr = 7 }}{{nihongo|'''Mimi'''|美々}} is an unlockable [[Playable characters|playable character]] in {{woh}}. She is unlocked by earning the [[World Saved II]] achievement. == Perks == == See also == *[[Mimi's Obsession]] [[Category:Playable characters]] [[Category:Characters]] f0ea94d6472b57ae0b5af673809a6fa8300c3c28 430 429 2024-02-08T00:12:55Z Otonashi Ayana 2 wikitext text/x-wiki {{Infobox character | name = Mimi | image = char6_mimi.png | title = Med Student | age = 22 | sex = Female | loadout = [[Scalpel]]<br>[[Mimi's Obsession]] | item = [[Anatomy Book]] | str = 6 | dex = 5 | per = 7 | knw = 8 | chr = 7 }}{{nihongo|'''Mimi'''|美々}} is an unlockable [[Playable characters|playable character]] in {{woh}}. She is unlocked by earning the [[World Saved II]] achievement. == Perks == == See also == *[[Mimi's Obsession]] [[Category:Playable characters]] [[Category:Characters]] 2393bd8d33d9f3dc7995470e28d82b066ba12c67 Playable characters 0 159 418 2024-02-07T07:28:12Z Otonashi Ayana 2 Redirected page to [[Characters#Playable characters]] wikitext text/x-wiki #REDIRECT[[Characters#Playable characters]] 57246f6858d2f6f712d27f3c4320f5f1e42456fe Funds 0 137 419 362 2024-02-07T07:30:43Z Otonashi Ayana 2 wikitext text/x-wiki '''Funds''', abbreviated as '''FND''', are the primary form of currency in {{woh}}. They can be used to buy weapons, items, spells, and even allies. The player starts every run with between 0 and 5 FND depending on difficulty. Funds can be acquired in various ways throughout any given playthrough: *Opening the figurine in the [[closet]] will provide the player with 1 FND. *The background [[The Seventh Curse]] starts the player with 4 additional FND. *Various [[events]] can provide FND. *The [[Shovel]] has a small chance to provide FND after combat. While the player can lose FND through failing events, it is impossible to have negative FND. If the player investigates with 0 FND then there is a chance to trigger the [[Out of Funds]] event. 5b37b440a21cedfb74b3a739c05f08d56a928ae7 420 419 2024-02-07T07:32:33Z Otonashi Ayana 2 wikitext text/x-wiki '''Funds''', abbreviated as '''FND''', are the primary form of currency in {{woh}}. They can be used to buy weapons, items, spells, and even allies. The player starts every run with between 0 and 5 FND depending on difficulty. Funds can be acquired in various ways throughout any given playthrough: *Opening the figurine in the [[closet]] will provide the player with 1 FND. *The background [[The Seventh Curse]] starts the player with 4 additional FND. *Various [[events]] can provide FND. *The [[Shovel]] has a small chance of digging up FND after combat when equipped. While the player can lose FND through failing events, it is impossible to have negative FND. If the player investigates with 0 FND then there is a chance to trigger the [[Out of Funds]] event. cb7c44369b585e4482982df7d696c640b9c98582 Template:Infobox status 10 140 421 380 2024-02-07T07:34:37Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox status/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image|}}}]] | label2 = Effect | data2 = {{{effect}}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0; }} be492c7a542d43895fdfc7c294c78d955f31028a Template:Infobox character 10 81 431 377 2024-02-08T00:13:30Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox character/styles.css" />{{Infobox | title = <span class="pixel-title">{{{name}}}</span><br><span style="font-style:italic">“{{{title}}}”</span> | image = [[File:{{{image}}}]] | header1 = Character Information | label2 = Also known as | data2 = {{{aka|}}} | label3 = Age | data3 = {{{age}}} | label4 = Sex | data4 = {{{sex}}} | label5 = Loadout | data5 = {{{loadout|}}} | label6 = Prep Item | data6 = {{{item|}}} | header7 = Stats | data8 = <div style="display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center"> <div class="stat"><span class="stat-label">STR</span><span class="stat-value">{{{str}}}</span></div> <div class="stat"><span class="stat-label">DEX</span><span class="stat-value">{{{dex}}}</span></div> <div class="stat"><span class="stat-label">PER</span><span class="stat-value">{{{per}}}</span></div> <div class="stat"><span class="stat-label">KNW</span><span class="stat-value">{{{knw}}}</span></div> <div class="stat"><span class="stat-label">CHR</span><span class="stat-value">{{{chr}}}</span></div> </div> | titlestyle = background:black;padding:4px 0 | headerstyle = background:black;text-align:center | labelstyle = vertical-align:top | imagestyle = text-align:center }} 6ea645e28f0fe94d0102cbe9973ecfcc93a292be Mimi 0 85 432 430 2024-02-08T00:13:49Z Otonashi Ayana 2 /* See also */ wikitext text/x-wiki {{Infobox character | name = Mimi | image = char6_mimi.png | title = Med Student | age = 22 | sex = Female | loadout = [[Scalpel]]<br>[[Mimi's Obsession]] | item = [[Anatomy Book]] | str = 6 | dex = 5 | per = 7 | knw = 8 | chr = 7 }}{{nihongo|'''Mimi'''|美々}} is an unlockable [[Playable characters|playable character]] in {{woh}}. She is unlocked by earning the [[World Saved II]] achievement. == Perks == == See also == *[[Mimi's Little Project]] [[Category:Playable characters]] [[Category:Characters]] c0026833dd015c1f134d4fa6a61210c1e1ce2402 File:Perk anatomy class.svg 6 160 433 2024-02-08T00:16:47Z Otonashi Ayana 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Template:Infobox perk 10 161 434 2024-02-08T00:17:52Z Otonashi Ayana 2 Created page with "<templatestyles src="Infobox perk/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image|}}}]] | label2 = Character | data2 = {{{character|}}} | label3 = Effect | data3 = {{{effect}}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0; }}" wikitext text/x-wiki <templatestyles src="Infobox perk/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image|}}}]] | label2 = Character | data2 = {{{character|}}} | label3 = Effect | data3 = {{{effect}}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0; }} ec68bfbdfe13162fb6e89add8a791adb2442fd44 440 434 2024-02-08T00:23:45Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox perk/styles.css" />{{Infobox | title = {{#if:{{{name|}}}|{{{name|}}}|{{PAGENAME}}}} | image = [[File:{{{image|}}}]] | label2 = Character | data2 = {{{character|}}} | label3 = Effect | data3 = {{{effect}}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0; }} 51811868e3fef75813d67e0af362f7964939146e Template:Infobox perk/styles.css 10 162 435 2024-02-08T00:18:07Z Otonashi Ayana 2 Created page with ".infobox{ width:250px; } .infobox-image img{ height:100%; width:100%; }" sanitized-css text/css .infobox{ width:250px; } .infobox-image img{ height:100%; width:100%; } 371af1d50f92ac7fc222c1fa01b944905db3412b Anatomy Class (perk) 0 163 436 2024-02-08T00:19:25Z Otonashi Ayana 2 Created page with "{{Infobox perk | image = perk_anatomy class.svg | character = [[Mimi]] | effect = Extra damage against HUMAN enemies }}" wikitext text/x-wiki {{Infobox perk | image = perk_anatomy class.svg | character = [[Mimi]] | effect = Extra damage against HUMAN enemies }} 690580b8ef9fb7c67a5c06a7c21e04aff586abde 439 436 2024-02-08T00:23:25Z Otonashi Ayana 2 wikitext text/x-wiki {{Infobox perk | name = Anatomy Class | image = perk_anatomy class.svg | character = [[Mimi]] | effect = Extra damage against HUMAN enemies }} 1665ef2337a491ba4f13045167c357dd45970d99 File:Perk fast learner.svg 6 164 437 2024-02-08T00:23:00Z Otonashi Ayana 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Perk first aid.svg 6 165 438 2024-02-08T00:23:08Z Otonashi Ayana 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 First Aid 0 166 441 2024-02-08T00:24:10Z Otonashi Ayana 2 Created page with "{{Infobox perk | image = perk_first aid.svg | character = [[Mimi]] | effect = Defeating an enemy regains 2 [[Reason]] }}" wikitext text/x-wiki {{Infobox perk | image = perk_first aid.svg | character = [[Mimi]] | effect = Defeating an enemy regains 2 [[Reason]] }} 05dc8cb272e8f1410b145bdd08b25dddae1aeae2 Fast Learner 0 167 442 2024-02-08T00:24:42Z Otonashi Ayana 2 Created page with "{{Infobox perk | image = perk_fast learner.svg | character = [[Mimi]] | effect = Getting damaged in combat grants a small experience bonus }}" wikitext text/x-wiki {{Infobox perk | image = perk_fast learner.svg | character = [[Mimi]] | effect = Getting damaged in combat grants a small experience bonus }} e69194ae1bfff88820e8c06824beb891464e12f3 Template:Infobox item 10 133 443 381 2024-02-08T00:27:38Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Type | data2 = {{{type|}}} | label3 = Traits | data3 = {{{traits|}}} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Effect | data5 = {{{effect|}}} | label6 = Damage | data6 = {{{dmg|}}} | label7 = Speed | data7 = {{{speed|}}} | label8 = Hit Chance | data8 = {{{hit|}}} | label9 = Throw Damage | data9 = {{{throw|}}} | label10 = Sell Price | data10 = {{#if:{{{sell|}}}|+{{{sell}}} [[Funds|FND]]}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0 | headerstyle = background:black;text-align:center }} 4155de43da9697dac9f803c85238d65b5727bfea Template:Trait 10 168 444 2024-02-08T00:28:45Z Otonashi Ayana 2 Created page with "{{#switch:{{{1}}} | one = [ONE-HANDED] | two = [TWO-HANDED] | sharp = [SHARP] | blunt = [BLUNT] | book = [BOOK] | personal = [PERSONAL] }}" wikitext text/x-wiki {{#switch:{{{1}}} | one = [ONE-HANDED] | two = [TWO-HANDED] | sharp = [SHARP] | blunt = [BLUNT] | book = [BOOK] | personal = [PERSONAL] }} 8e97e6ae0b96b3ae82b3854d265f7d4d610f1652 Template:Plainlist 10 169 446 445 2024-02-08T00:30:24Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Plainlist]] wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> 582fe7098c25c1ecfc0ad32f62ecd674ebe2bdf0 Module:Redirect 828 170 448 447 2024-02-08T00:30:27Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Redirect]] Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 Template:Mono 10 171 450 449 2024-02-08T00:30:27Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Mono]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>ifsubst|1=|2=<templatestyles src="Mono/styles.css" />}}<span class="monospaced">{{{2|{{{1}}}}}}</span><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 800f06823c02b03f8b9cf1e245ad8c4829cfe931 Template:Ifsubst 10 172 452 451 2024-02-08T00:30:27Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Ifsubst]] wikitext text/x-wiki {{ safesubst:<noinclude/>#if:{{{demo|}}} |{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }} |{{ safesubst:<noinclude/>#ifeq:{{ safesubst:<noinclude/>NAMESPACE}}|{{NAMESPACE}} |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }}}}<noinclude> {{Documentation}} </noinclude> 38e667b5df326086489bf557a5f7c4e43393af78 Template:Mono/styles.css 10 173 454 453 2024-02-08T00:30:28Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Mono/styles.css]] sanitized-css text/css /* {{pp-template}} */ .monospaced { /* "monospace, monospace" per [[WP:MONO]] */ font-family: monospace, monospace; } cadfc2ad2e42cde230abf3e74ad418f7c4c71ab4 Template:Yesno-yes 10 174 456 455 2024-02-08T00:30:29Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Yesno-yes]] wikitext text/x-wiki {{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1644b79058ef2cece539a411edc164d98bb11ebe Template:Flatlist 10 175 458 457 2024-02-08T00:30:29Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Flatlist]] wikitext text/x-wiki <templatestyles src="Hlist/styles.css"/><div class="hlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> cf60aa4aef920d48fa394e786f72fe5f6dcd3169 Template:Hlist 10 176 460 459 2024-02-08T00:30:30Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Hlist]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9e3824c2e3c0e0dbef2f37556ac0b994987fecf9 Template:Unbulleted list 10 177 462 461 2024-02-08T00:30:30Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Unbulleted_list]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|unbulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 89815a491d3e05b20af446e34cda13f13c25fb4f Module:Delink 828 178 464 463 2024-02-08T00:30:32Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Delink]] Scribunto text/plain -- This module de-links most wikitext. require("strict") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return s end return s:match("%[%[|(.*)%]%]") end local function delinkPipeTrick(s) -- We need to deal with colons, brackets, and commas, per [[Help:Pipe trick]]. -- First, remove the text before the first colon, if any. if s:match(":") then s = s:match("%[%[.-:(.*)|%]%]") -- If there are no colons, grab all of the text apart from the square brackets and the pipe. else s = s:match("%[%[(.*)|%]%]") end -- Next up, brackets and commas. if s:match("%(.-%)$") then -- Brackets trump commas. s = s:match("(.-) ?%(.-%)$") elseif s:match(",") then -- If there are no brackets, display only the text before the first comma. s = s:match("(.-),.*$") end return s end -- Return wikilink target |wikilinks=target local function getDelinkedTarget(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end return target_area end local function getDelinkedLabel(s) local result = s -- Deal with the reverse pipe trick. if result:match("%[%[|") then return delinkReversePipeTrick(result) end result = mw.uri.decode(result, "PATH") -- decode percent-encoded entities. Leave underscores and plus signs. result = mw.text.decode(result, true) -- decode HTML entities. -- Check for bad titles. To do this we need to find the -- title area of the link, i.e. the part before any pipes. local target_area if result:match("|") then -- Find if we're dealing with a piped link. target_area = result:match("^%[%[(.-)|.*%]%]") else target_area = result:match("^%[%[(.-)%]%]") end -- Check for bad characters. if mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") and mw.ustring.match(target_area, "[%[%]<>{}%%%c\n]") ~= "?" then return s end -- Check for categories, interwikis, and files. local colon_prefix = result:match("%[%[(.-):.*%]%]") or "" -- Get the text before the first colon. local ns = mw.site.namespaces[colon_prefix] -- see if this is a known namespace if mw.language.isKnownLanguageTag(colon_prefix) or (ns and (ns.canonicalName == "File" or ns.canonicalName == "Category")) then return "" end -- Remove the colon if the link is using the [[Help:Colon trick]]. if result:match("%[%[:") then result = "[[" .. result:match("%[%[:(.*%]%])") end -- Deal with links using the [[Help:Pipe trick]]. if mw.ustring.match(result, "^%[%[[^|]*|%]%]") then return delinkPipeTrick(result) end -- Find the display area of the wikilink if result:match("|") then -- Find if we're dealing with a piped link. result = result:match("^%[%[.-|(.+)%]%]") -- Remove new lines from the display of multiline piped links, -- where the pipe is before the first new line. result = result:gsub("\n", "") else result = result:match("^%[%[(.-)%]%]") end return result end local function delinkURL(s) -- Assume we have already delinked internal wikilinks, and that -- we have been passed some text between two square brackets [foo]. -- If the text contains a line break it is not formatted as a URL, regardless of other content. if s:match("\n") then return s end -- Check if the text has a valid URL prefix and at least one valid URL character. local valid_url_prefixes = {"//", "http://", "https://", "ftp://", "gopher://", "mailto:", "news:", "irc://"} local url_prefix for _ ,v in ipairs(valid_url_prefixes) do if mw.ustring.match(s, '^%[' .. v ..'[^"%s].*%]' ) then url_prefix = v break end end -- Get display text if not url_prefix then return s end s = s:match("^%[" .. url_prefix .. "(.*)%]") -- Grab all of the text after the URL prefix and before the final square bracket. s = s:match('^.-(["<> ].*)') or "" -- Grab all of the text after the first URL separator character ("<> ). s = mw.ustring.match(s, "^%s*(%S.*)$") or "" -- If the separating character was a space, trim it off. local s_decoded = mw.text.decode(s, true) if mw.ustring.match(s_decoded, "%c") then return s end return s_decoded end local function delinkLinkClass(text, pattern, delinkFunction) if type(text) ~= "string" then error("Attempt to de-link non-string input.", 2) end if type(pattern) ~= "string" or mw.ustring.sub(pattern, 1, 1) ~= "^" then error('Invalid pattern detected. Patterns must begin with "^".', 2) end -- Iterate over the text string, and replace any matched text. using the -- delink function. We need to iterate character by character rather -- than just use gsub, otherwise nested links aren't detected properly. local result = "" while text ~= "" do -- Replace text using one iteration of gsub. text = mw.ustring.gsub(text, pattern, delinkFunction, 1) -- Append the left-most character to the result string. result = result .. mw.ustring.sub(text, 1, 1) text = mw.ustring.sub(text, 2, -1) end return result end function p._delink(args) local text = args[1] or "" if args.refs == "yes" then -- Remove any [[Help:Strip markers]] representing ref tags. In most situations -- this is not a good idea - only use it if you know what you are doing! text = mw.ustring.gsub(text, "UNIQ%w*%-ref%-%d*%-QINU", "") end if args.comments ~= "no" then text = text:gsub("<!%-%-.-%-%->", "") -- Remove html comments. end if args.wikilinks ~= "no" and args.wikilinks ~= "target" then -- De-link wikilinks and return the label portion of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedLabel) elseif args.wikilinks == "target" then -- De-link wikilinks and return the target portions of the wikilink. text = delinkLinkClass(text, "^%[%[.-%]%]", getDelinkedTarget) end if args.urls ~= "no" then text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs. end if args.whitespace ~= "no" then -- Replace single new lines with a single space, but leave double new lines -- and new lines only containing spaces or tabs before a second new line. text = mw.ustring.gsub(text, "([^\n \t][ \t]*)\n([ \t]*[^\n \t])", "%1 %2") text = text:gsub("[ \t]+", " ") -- Remove extra tabs and spaces. end return text end function p.delink(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return p._delink(getArgs(frame, {wrappers = 'Template:Delink'})) end return p 5b8e75ac750b5d3ed76cc4158aefcd1568a6a6fd Module:Navbox 828 179 466 465 2024-02-08T00:30:35Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Navbox]] Scribunto text/plain require('strict') local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 05be9a97c035ab3f0fac69423779e261949d473c Module:Navbox/configuration 828 180 468 467 2024-02-08T00:30:36Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Navbox/configuration]] Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Module:Navbox/styles.css 828 181 470 469 2024-02-08T00:30:36Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Navbox/styles.css]] sanitized-css text/css /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Template:For loop 10 182 472 471 2024-02-08T00:30:38Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:For_loop]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:For loop|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 12b7b7010fe32f888e21bcdfa6a904fc8a925437 Module:For loop 828 183 474 473 2024-02-08T00:30:38Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:For_loop]] Scribunto text/plain -- This module implements {{for loop}}. local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local p = {} function p.main(frame) local args = getArgs(frame, { trim = false, removeBlanks = false }) return p._main(args) end function p._main(args) local template = args['call'] or 'void' local calltemplates = yesno(args.substall or "", true) or not mw.isSubsting() local variableParam = args.pv variableParam = tonumber(variableParam) or variableParam or 1 -- fix for positional parameters local variableValPrefix = args.prefix or '' local variableValPostfix = args.postfix or '' local sep = args[1] or '' local constantArgs = p.getConstants(args) local variableVals = p.getVariableVals(args) local result = '' local addSeparator = false; for _, v in ipairs(variableVals) do v = mw.text.trim(v) if #v > 0 or not yesno(args.skipBlanks) then if addSeparator then result = result .. sep end addSeparator = true; local targs = constantArgs targs[variableParam] = variableValPrefix .. v .. variableValPostfix if calltemplates then local output = p.callTemplate(template, targs) if #mw.text.trim(output) == 0 then addSeparator = false end result = result .. output else local makeTemplate = require('Module:Template invocation').invocation result = result .. makeTemplate(template, targs) end end end return result end function p.getConstants(args) local constantArgNums = p.getArgNums(args, 'pc', 'n') local constantArgs = {} for _, num in ipairs(constantArgNums) do local keyArg = 'pc' .. tostring(num) .. 'n' local valArg = 'pc' .. tostring(num) .. 'v' local key = args[keyArg] key = tonumber(key) or key local value = args[valArg] constantArgs[key] = value end return constantArgs end function p.getVariableVals(args) local variableVals = {} if args.start or args.stop or args.by then if args[2] then error("Both start/stop/by and numbered parameters specified") end local start = tonumber(args.start or 1) local stop = tonumber(args.stop or 1) local by = tonumber(args.by or 1) for i = start, stop, by do variableVals [#variableVals + 1] = i end else for i, v in ipairs(args) do if i ~= 1 then variableVals[i - 1] = v end end end return variableVals end function p.getArgNums(args, prefix, suffix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix and suffix. local nums = {} local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' for k, _ in pairs(args) do local num = tostring(k):match(pattern) if num then nums[#nums + 1] = tonumber(num) end end table.sort(nums) return nums end function p.callTemplate(template, targs) return mw.getCurrentFrame():expandTemplate{title = template, args = targs} end return p 4ed4682b1fd3fbf2bf0836b46dd19bc0363d40e2 Module:Template wrapper 828 184 476 475 2024-02-08T00:30:39Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Template_wrapper]] Scribunto text/plain require('strict'); local error_msg = '<span style=\"font-size:100%\" class=\"error\"><code style=\"color:inherit; border:inherit; padding:inherit;\">&#124;_template=</code> missing or empty</span>'; --[[--------------------------< I S _ I N _ T A B L E >-------------------------------------------------------- scan through tbl looking for value; return true if found, false else ]] local function is_in_table (tbl, value) for k, v in pairs (tbl) do if v == value then return true end end return false; end --[[--------------------------< A D D _ P A R A M E T E R >---------------------------------------------------- adds parameter name and its value to args table according to the state of boolean list argument; kv pair for template execution; k=v string for template listing. ]] local function add_parameter (k, v, args, list) if list then table.insert( args, table.concat ({k, '=', v})); -- write parameter names and values to args table as string else args[k] = v; -- copy parameters to args table end end --[[--------------------------< A L I A S _ M A P _ G E T >---------------------------------------------------- returns a table of local template (parent frame) parameter names and the target template names that match where in [key]=<value> pairs where: [key] is local template parameter name (an alias) <value> is target template parameter name (the canonical parameter name used in the working template) The parameter |_alias-map= has the form: |_alias-map=<list> where <list> is a comma-separated list of alias / canonical parameter name pairs in the form <from> : <to> where: <from> is the local template's parameter name (alias) <to> is the target template's parameter name (canonical) for enumerated parameters place an octothorp (#) where the enumerator digits are placed in the parameter names: <from#> : <to#> ]] local function alias_map_get (_alias_map) local T = mw.text.split (_alias_map, '%s*,%s*'); -- convert the comma-separated list into a table of alias pairs local mapped_aliases = {}; -- mapped aliases will go here local l_name, t_name; -- parameter names for _, alias_pair in ipairs (T) do -- loop through the table of alias pairs l_name, t_name = alias_pair:match ('(.-)%s*:%s*(.+)'); -- from each pair, get local and target parameter names if l_name and t_name then -- if both are set if tonumber (l_name) then l_name = tonumber (l_name); -- convert number-as-text to a number end mapped_aliases[l_name] = t_name; -- add them to the map table end end return mapped_aliases; end --[[--------------------------< F R A M E _ A R G S _ G E T >-------------------------------------------------- Fetch the wrapper template's 'default' and control parameters; adds default parameters to args returns content of |_template= parameter (name of the working template); nil else ]] local function frame_args_get (frame_args, args, list) local template; for k, v in pairs (frame_args) do -- here we get the wrapper template's 'default' parameters if 'string' == type (k) and (v and ('' ~= v)) then -- do not pass along positional or empty parameters if '_template' == k then template = v; -- save the name of template that we are wrapping elseif '_exclude' ~= k and '_reuse' ~= k and '_include-positional' ~= k and '_alias-map' ~= k then -- these already handled so ignore here; add_parameter (k, v, args, list); -- add all other parameters to args in the style dictated by list end end end return template; -- return contents of |_template= parameter end --[=[--------------------------< P F R A M E _ A R G S _ G E T >------------------------------------------------ Fetches the wrapper template's 'live' parameters; adds live parameters that aren't members of the exclude table to args table; positional parameters may not be excluded no return value ]=] local function pframe_args_get (pframe_args, args, exclude, _include_positional, list) for k, v in pairs (pframe_args) do if 'string' == type (k) and not is_in_table (exclude, k) then -- do not pass along excluded parameters if v and ('' ~= v) then -- pass along only those parameters that have assigned values if 'unset' == v:lower() then -- special keyword to unset 'default' parameters set in the wrapper template v = ''; -- unset the value in the args table end add_parameter (k, v, args, list) -- add all other parameters to args in the style dictated by list; alias map only supported for local-template parameters end end end if _include_positional then for i, v in ipairs (pframe_args) do -- pass along positional parameters if 'unset' == v:lower() then -- special keyword to unset 'default' parameters set in the wrapper template v = ''; -- unset the value in the args table end add_parameter (i, v, args, list); end end end --[[--------------------------< _ M A I N >-------------------------------------------------------------------- Collect the various default and live parameters into args styled according to boolean list. returns name of the working or listed template or nil for an error message ]] local function _main (frame, args, list) local template; local exclude = {}; -- table of parameter names for parameters that are not passed to the working template local reuse_list = {}; -- table of pframe parameter names whose values are modified before they are passed to the working template as the same name local alias_map = {}; -- table that maps parameter aliases to working template canonical parameter names local _include_positional; if frame.args._exclude and ('' ~= frame.args._exclude) then -- if there is |_exclude= and it's not empty exclude = mw.text.split (frame.args._exclude, "%s*,%s*"); -- make a table from its contents end -- TODO: |_reuse= needs a better name (|_reuse=) if frame.args._reuse and ('' ~= frame.args._reuse) then -- if there is |_reuse= and it's not empty reuse_list = mw.text.split (frame.args._reuse, "%s*,%s*"); -- make a table from its contents end if frame.args['_alias-map'] and ('' ~= frame.args['_alias-map']) then -- if there is |_alias-map= and it's not empty alias_map = alias_map_get (frame.args['_alias-map']); -- make a table from its contents end template = frame_args_get (frame.args, args, list); -- get parameters provided in the {{#invoke:template wrapper|...|...}} if nil == template or '' == template then -- this is the one parameter that is required by this module return nil; -- not present, tell calling function to emit an error message end _include_positional = 'yes' == frame.args['_include-positional']; -- when true pass all positional parameters along with non-excluded named parameters to ... -- ... the working template; positional parameters are not excludable local _pframe_args = frame:getParent().args; -- here we get the wrapper template's 'live' parameters from pframe.args local pframe_args = {}; -- a local table that we can modify for k, v in pairs (_pframe_args) do -- make a copy that we can modify pframe_args[k] = v; end -- here we look for pframe parameters that are aliases of canonical parameter names; when found -- we replace the alias with the canonical. We do this here because the reuse_list works on -- canonical parameter names so first we convert alias parameter names to canonical names and then -- we remove those canonical names from the pframe table that are reused (provided to the working -- template through the frame args table) for k, v in pairs (alias_map) do -- k is alias name, v is canonical name if pframe_args[k] then -- if pframe_args has parameter with alias name pframe_args[v] = _pframe_args[k]; -- create new canonical name with alias' value pframe_args[k] = nil; -- unset the alias end end for k, v in pairs (pframe_args) do -- do enumerated parameter alias -> canonical translation if 'string' == type (k) then -- only named parameters can be enumerated if alias_map[k..'#'] then -- non-enumerated alias matches enumerated parameter pattern? enumerator at end only pframe_args[alias_map[k..'#']:gsub('#', '')] = v; -- remove '#' and copy parameter to pframe_args table pframe_args[k] = nil; -- unset the alias elseif k:match ('%d+') then -- if this parameter name contains digits local temp = k:gsub ('%d+', '#'); -- make a copy; digits replaced with single '#' local enum = k:match ('%d+'); -- get the enumerator if alias_map[temp] then -- if this parameter is a recognized enumerated alias pframe_args[alias_map[temp]:gsub('#', enum)] = v; -- use canonical name and replace '#' with enumerator and add to pframe_args pframe_args[k] = nil; -- unset the alias end end end end -- pframe parameters that are _reused are 'reused' have the form something like this: -- |chapter=[[wikisource:{{{chapter}}}|{{{chapter}}}]] -- where a parameter in the wrapping template is modified and then passed to the working template -- using the same parameter name (in this example |chapter=) -- remove parameters that will be reused for k, v in ipairs (reuse_list) do -- k is numerical index, v is canonical parameter name to ignore if pframe_args[v] then -- if pframe_args has parameter that should be ignored pframe_args[v] = nil; -- unset the ignored parameter end end pframe_args_get (pframe_args, args, exclude, _include_positional, list); -- add parameters and values to args that are not listed in the exclude table return template; -- args now has all default and live parameters, return working template name end --[[--------------------------< W R A P >---------------------------------------------------------------------- Template entry point. Call this function to 'execute' the working template ]] local function wrap (frame) local args = {}; -- table of default and live parameters and their values to be passed to the wrapped template local template; -- the name of the working template template = _main (frame, args, false); -- get default and live parameters and the name of the working template if not template then -- template name is required return error_msg; -- emit error message and abandon if template name not present end return frame:expandTemplate {title=template, args=args}; -- render the working template end --[[--------------------------< L I S T >---------------------------------------------------------------------- Template entry point. Call this function to 'display' the source for the working template. This function added as a result of a TfD here: Wikipedia:Templates_for_discussion/Log/2018_April_28#Module:PassArguments This function replaces a similarly named function which was used in {{cite compare}} and {{cite compare2}} Values in the args table are numerically indexed strings in the form 'name=value' ]] local function list(frame, do_link) local args = {}; -- table of default and live parameters and their values to be passed to the listed template local template; -- the name of the listed template template = _main (frame, args, true); -- get default and live parameters and the name of the listed template if not template then -- template name is required return error_msg; -- emit error message and abandon if template name not present end if do_link then template = ('[[%s|%s]]'):format(frame:expandTemplate{ title='Transclude', args = {template} }, template) end table.sort(args) for i = 1, #args do local stripped = args[i]:match('^' .. i .. '=([^=]*)$') if stripped then args[i] = stripped else break end end return frame:preprocess(table.concat({ '<code style="color:inherit; background:inherit; border:none;">&#123;&#123;', template, ('<wbr><nowiki>|%s</nowiki>'):rep(#args):format(unpack(args)), '&#125;&#125;</code>'})); -- render the template end local function link (frame) return list(frame, true) end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { link = link, list = list, wrap = wrap, }; 5e3d3ed3f3988725fb0fef6b44479bacc4210f37 Module:Color contrast 828 185 478 477 2024-02-08T00:30:39Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Color_contrast]] Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Module:Color contrast/colors 828 186 480 479 2024-02-08T00:30:39Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Color_contrast/colors]] Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Template:!- 10 187 482 481 2024-02-08T00:30:40Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:!-]] wikitext text/x-wiki |-<noinclude> {{documentation}} </noinclude> 19a1b27b5273caa6fd83a1208fb704afa9ee7c04 Template:Navbox bottom 10 188 484 483 2024-02-08T00:30:40Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Navbox_bottom]] wikitext text/x-wiki <includeonly>{{#invoke:navbox top and bottom|bottom}}</includeonly><noinclude> {{documentation|Template:Navbox top/doc}}</noinclude> 65e502a67d1bc2bba488cdada997a395b417883c Template:Navbox top 10 189 486 485 2024-02-08T00:30:41Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Navbox_top]] wikitext text/x-wiki <includeonly>{{#invoke:navbox top and bottom|top}}</includeonly><noinclude> {{documentation}} </noinclude> d92793ae2725f6cbd0007a404bcce9a530d30349 Module:Navbox top and bottom 828 190 488 487 2024-02-08T00:30:41Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Navbox_top_and_bottom]] Scribunto text/plain -- This implements {{navbox top}} and {{navbox bottom}} local p = {} local function build_navbox(parentArgs, list) local args = {} for argName, value in pairs(parentArgs) do if value ~= '' then if type(argName) == 'string' then args[argName] = value end end end args['bodystyle'] = 'display:table;' .. (args['bodystyle'] or '') args['list1padding'] = '0' args['list1style'] = 'border-width:0;' args['list1'] = list -- Note Navbox.navbox() has a kludge to order the parent frame's args -- into a specific order. For now, this is omitted from this module. local Navbox = require('Module:Navbox') return Navbox._navbox(args) end function p.top(frame) local args = frame:getParent().args local parts = mw.text.split(build_navbox(args, '<ADD LIST HERE>'), '<ADD LIST HERE>') return parts[1] end function p.bottom(frame) local args = frame:getParent().args local parts = mw.text.split(build_navbox(args, '<ADD LIST HERE>'), '<ADD LIST HERE>') return parts[2] end return p ac5dfc18e5611b01115dbf9818d1cf54ee5156d2 Template:!! 10 191 490 489 2024-02-08T00:30:41Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:!!]] wikitext text/x-wiki ||<noinclude> {{documentation}} </noinclude> cfbaaca3cb3edae590f75b87fb775d1be21774a4 Template:Bulleted list 10 192 492 491 2024-02-08T00:30:42Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Bulleted_list]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|bulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 37ac60a83d34c2df10fb601002557ad1b55919bb Template:Ordered list 10 193 494 493 2024-02-08T00:30:42Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Ordered_list]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|ordered}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> c74568f5fac4f743ef2e52f830e220d8cdbc3ae1 Module:TNT 828 76 496 176 2024-02-08T00:30:42Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:TNT]] Scribunto text/plain -- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT -- Please do not modify it anywhere else, as it may get copied and override your changes. -- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT -- -- DESCRIPTION: -- The "msg" function uses a Commons dataset to translate a message -- with a given key (e.g. source-table), plus optional arguments -- to the wiki markup in the current content language. -- Use lang=xx to set language. Example: -- -- {{#invoke:TNT | msg -- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --> -- | source-table <!-- uses a translation message with id = "source-table" --> -- | param1 }} <!-- optional parameter --> -- -- -- The "doc" function will generate the <templatedata> parameter documentation for templates. -- This way all template parameters can be stored and localized in a single Commons dataset. -- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons. -- -- {{#invoke:TNT | doc | Graph:Lines }} -- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab -- if the current page is Template:Graph:Lines/doc -- local p = {} local i18nDataset = 'I18n/Module:TNT.tab' -- Forward declaration of the local functions local sanitizeDataset, loadData, link, formatMessage function p.msg(frame) local dataset, id local params = {} local lang = nil for k, v in pairs(frame.args) do if k == 1 then dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then params[k - 2] = mw.text.trim(v) elseif k == 'lang' and v ~= '_' then lang = mw.text.trim(v) end end return formatMessage(dataset, id, params, lang) end -- Identical to p.msg() above, but used from other lua modules -- Parameters: name of dataset, message key, optional arguments -- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.format(dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('format', 1, dataset, 'string') checkType('format', 2, key, 'string') return formatMessage(dataset, key, {...}) end -- Identical to p.msg() above, but used from other lua modules with the language param -- Parameters: language code, name of dataset, message key, optional arguments -- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.formatInLanguage(lang, dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('formatInLanguage', 1, lang, 'string') checkType('formatInLanguage', 2, dataset, 'string') checkType('formatInLanguage', 3, key, 'string') return formatMessage(dataset, key, {...}, lang) end -- Obsolete function that adds a 'c:' prefix to the first param. -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' function p.link(frame) return link(frame.args[1]) end function p.doc(frame) local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1]) return frame:extensionTag('templatedata', p.getTemplateData(dataset)) .. formatMessage(i18nDataset, 'edit_doc', {link(dataset)}) end function p.getTemplateData(dataset) -- TODO: add '_' parameter once lua starts reindexing properly for "all" languages local data = loadData(dataset) local names = {} for _, field in ipairs(data.schema.fields) do table.insert(names, field.name) end local params = {} local paramOrder = {} for _, row in ipairs(data.data) do local newVal = {} local name = nil for pos, columnName in ipairs(names) do if columnName == 'name' then name = row[pos] else newVal[columnName] = row[pos] end end if name then params[name] = newVal table.insert(paramOrder, name) end end -- Work around json encoding treating {"1":{...}} as an [{...}] params['zzz123']='' local json = mw.text.jsonEncode({ params=params, paramOrder=paramOrder, description=data.description }) json = string.gsub(json,'"zzz123":"",?', "") return json end -- Local functions sanitizeDataset = function(dataset) if not dataset then return nil end dataset = mw.text.trim(dataset) if dataset == '' then return nil elseif string.sub(dataset,-4) ~= '.tab' then return dataset .. '.tab' else return dataset end end loadData = function(dataset, lang) dataset = sanitizeDataset(dataset) if not dataset then error(formatMessage(i18nDataset, 'error_no_dataset', {})) end -- Give helpful error to thirdparties who try and copy this module. if not mw.ext or not mw.ext.data or not mw.ext.data.get then error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset) end local data = mw.ext.data.get(dataset, lang) if data == false then if dataset == i18nDataset then -- Prevent cyclical calls error('Missing Commons dataset ' .. i18nDataset) else error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)})) end end return data end -- Given a dataset name, convert it to a title with the 'commons:data:' prefix link = function(dataset) return 'c:Data:' .. mw.text.trim(dataset or '') end formatMessage = function(dataset, key, params, lang) for _, row in pairs(loadData(dataset, lang).data) do local id, msg = unpack(row) if id == key then local result = mw.message.newRawMessage(msg, unpack(params or {})) return result:plain() end end if dataset == i18nDataset then -- Prevent cyclical calls error('Invalid message key "' .. key .. '"') else error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)})) end end return p 2c570369c78089aef29c72768918373f61b7075d Template:Columns-list 10 194 498 497 2024-02-08T00:30:43Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Columns-list]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#if:{{{1|}}}|{{<includeonly>safesubst:</includeonly>#invoke:Template wrapper|wrap|_template=div col|_alias-map=1:content|colwidth=30em}}}}{{<includeonly>safesubst:</includeonly>#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using columns-list with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Columns-list]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | class | content | colwidth | gap | rules | small | style }}<noinclude> {{documentation}} </noinclude> 63b94b07a4d48047a0a217207f690036c3479aea Template:Section link 10 195 500 499 2024-02-08T00:30:43Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Section_link]] wikitext text/x-wiki {{#invoke:Section link|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 8d047e5845f8a9b74a4655b5dd79ca7595a8f88b Module:Section link 828 196 502 501 2024-02-08T00:30:43Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Section_link]] Scribunto text/plain -- This module implements {{section link}}. require('strict'); local checkType = require('libraryUtil').checkType local p = {} local function makeSectionLink(page, section, display) display = display or section page = page or '' -- MediaWiki doesn't allow these in `page`, so only need to do for `section` if type(section) == 'string' then section = string.gsub(section, "{", "&#x7B;") section = string.gsub(section, "}", "&#x7D;") end return string.format('[[%s#%s|%s]]', page, section, display) end local function normalizeTitle(title) title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '') title = mw.ustring.gsub(title, "%b<>", "") return mw.title.new(title).prefixedText end function p._main(page, sections, options, title) -- Validate input. checkType('_main', 1, page, 'string', true) checkType('_main', 3, options, 'table', true) if sections == nil then sections = {} elseif type(sections) == 'string' then sections = {sections} elseif type(sections) ~= 'table' then error(string.format( "type error in argument #2 to '_main' " .. "(string, table or nil expected, got %s)", type(sections) ), 2) end options = options or {} title = title or mw.title.getCurrentTitle() -- Deal with blank page names elegantly if page and not page:find('%S') then page = nil options.nopage = true end -- Make the link(s). local isShowingPage = not options.nopage if #sections <= 1 then local linkPage = page or '' local section = sections[1] or 'Notes' local display = '§&nbsp;' .. section if isShowingPage then page = page or title.prefixedText if options.display and options.display ~= '' then if normalizeTitle(options.display) == normalizeTitle(page) then display = options.display .. ' ' .. display else error(string.format( 'Display title "%s" was ignored since it is ' .. "not equivalent to the page's actual title", options.display ), 0) end else display = page .. ' ' .. display end end return makeSectionLink(linkPage, section, display) else -- Multiple sections. First, make a list of the links to display. local ret = {} for i, section in ipairs(sections) do ret[i] = makeSectionLink(page, section) end -- Assemble the list of links into a string with mw.text.listToText. -- We use the default separator for mw.text.listToText, but a custom -- conjunction. There is also a special case conjunction if we only -- have two links. local conjunction if #sections == 2 then conjunction = '&#8203; and ' else conjunction = ', and ' end ret = mw.text.listToText(ret, nil, conjunction) -- Add the intro text. local intro = '§§&nbsp;' if isShowingPage then intro = (page or title.prefixedText) .. ' ' .. intro end ret = intro .. ret return ret end end function p.main(frame) local yesno = require('Module:Yesno') local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Section link', valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does this. if value ~= '' or key == 1 then return value end end }) for k, v in pairs(args) do -- replace underscores in the positional parameter values if 'number' == type(k) then if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters else args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores end end end -- Sort the arguments. local page local sections, options = {}, {} for k, v in pairs(args) do if k == 1 then -- Doing this in the loop because of a bug in [[Module:Arguments]] -- when using pairs with deleted arguments. page = mw.text.decode(v, true) elseif type(k) == 'number' then sections[k] = v else options[k] = v end end options.nopage = yesno (options.nopage); -- make boolean -- Extract section from page, if present if page then local p, s = page:match('^(.-)#(.*)$') if p then page, sections[1] = p, s end end -- Compress the sections array. local function compressArray(t) local nums, ret = {}, {} for num in pairs(t) do nums[#nums + 1] = num end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end sections = compressArray(sections) return p._main(page, sections, options) end return p 5cc61d43dc601ca43e9472500fc5cd09ca7cea44 Template:No redirect 10 197 504 503 2024-02-08T00:30:44Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:No_redirect]] wikitext text/x-wiki {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} }}<noinclude> {{documentation}} </noinclude> 1760035b1bed54ee08b810208ed3551b812dfe13 Template:Endplainlist 10 198 506 505 2024-02-08T00:30:46Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Endplainlist]] wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Plainlist/doc}} </noinclude> d545c41582328dd4f197e2b1848c8ad7392b92e0 Template:Tag 10 199 508 507 2024-02-08T00:30:46Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Tag]] wikitext text/x-wiki <code class="{{#ifeq:{{{wrap|}}}|yes|wrap|nowrap}}" style="{{#ifeq:{{{style|}}}|plain|border:none;background:transparent;|{{{style|}}}}}"><!-- Opening tag -->{{#switch:{{{2|pair}}} |c|close = |e|empty|s|single|v|void |o|open |p|pair = &lt;{{#if:{{{link|}}}|[[HTML element#{{{1|tag}}}|{{{1|tag}}}]]|{{{1|tag}}}}}{{#if:{{{params|{{{attribs|}}}}}}|&#32;{{{params|{{{attribs}}}}}}}} }}<!-- Content between tags -->{{#switch:{{{2|pair}}} |c|close = {{{content|}}} |e|empty|s|single|v|void = &#32;&#47;&gt; |o|open = &gt;{{{content|}}} |p|pair = {{#ifeq:{{{1|tag}}}|!--||&gt;}}{{{content|...}}} }}<!-- Closing tag -->{{#switch:{{{2|pair}}} |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:{{{1|tag}}}|!--|--&gt;|&lt;&#47;{{{1|tag}}}&gt;}} }}<!-- --></code><noinclude> {{Documentation}} </noinclude> eae208bc1612c834de697fa3ee9b343966cf8602 Template:Cslist 10 200 510 509 2024-02-08T00:30:46Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Cslist]] wikitext text/x-wiki <templatestyles src="Cslist/styles.css" />{{#invoke:Cslist |makelist}}<noinclude> {{documentation}} </noinclude> 8de0ef2dc8a52f1f2d050ca747d583cd776a0b84 Template:Cslist/styles.css 10 201 512 511 2024-02-08T00:30:47Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Cslist/styles.css]] sanitized-css text/css /* {{pp-template}} */ /* make an inline list with either comma or semicolon separators */ ul.cslist, ul.sslist { margin: 0; padding: 0; display: inline-block; list-style: none; } ul.cslist-embedded { display: inline; } .cslist li, .sslist li { margin: 0; padding: 0 0.25em 0 0; display: inline-block; } .cslist li:after { content: ", "; } .sslist li:after { content: "; "; } .cslist li:last-child:after, .sslist li:last-child:after { content: none; } b7fc7c7a6f4e14d23d0a7483f5727aec838c7a21 Module:Cslist 828 202 514 513 2024-02-08T00:30:47Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Cslist]] Scribunto text/plain p = {} p.makelist = function(frame) local args = frame.args if not args[1] then args = frame:getParent().args if not args[1] then return end end local semi = (args.semi or ""):sub(1,1):lower() semi = (semi == "t") or (semi == "y") local embedded = (args.embedded or ""):sub(1,1):lower() embedded = (embedded == "y") local out = "" for k, v in ipairs(args) do v = mw.text.trim(v) if v ~= "" then out = out .. "<li>" .. v .. "</li>" end end local listclass = "" if semi then listclass = listclass .. "sslist" else listclass = listclass .. "cslist" end if embedded then listclass = listclass .. " cslist-embedded" end if out ~= "" then return '<ul class="'.. listclass ..'">' .. out .. '</ul>' end end return p 82fa872fef0f065ea5b7e6639e4390c93142fac9 Module:WLink 828 203 516 515 2024-02-08T00:30:48Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:WLink]] Scribunto text/plain local WLink = { suite = "WLink", serial = "2016-10-05" }; --[=[ ansiPercent() formatURL() getArticleBase() getBaseTitle() getEscapedTitle() getExtension() getFile() getFragment() getLanguage() getNamespace() getPlain() getProject() getTarget() getTargetPage() getTitle() getWeblink() isBracketedLink() isBracketedURL() isCategorization() isExternalLink() isInterlanguage() isInterwiki() isMedia() isTitledLink() isValidLink() isWikilink() wikilink() failsafe() ]=] -- local globals local URLutil = false; local utilURL = function () -- Attach URLutil library module -- Postcondition: -- Returns table, with URLutil library -- Throws error, if not available if not URLutil then local lucky, util = pcall( require, "Module:URLutil" ); if lucky then if type( util ) == "table" then URLutil = util.URLutil(); end util = "library URLutil invalid"; end if type( URLutil ) ~= "table" then error( util, 0 ); end end return URLutil; end -- utilURL() local contentExtlink = function ( attempt ) -- Retrieve span of external link between brackets -- Precondition: -- attempt -- string, with presumable link -- the first char is expected to be "[" -- Postcondition: -- Returns string, number, number -- string including whitespace -- number with index of relevant "[" -- number with index after relevant "]" -- false if nothing found local r1 = false; local r2 = false; local r3 = attempt:find( "]", 2, true ); if r3 then local s = attempt:sub( 2, r3 - 1 ); local i = s:find( "[", 1, true ); if i then r1 = s:sub( i + 1 ); r2 = i; else r1 = s; r2 = 1; end else r3 = false; end return r1, r2, r3; end -- contentExtlink() local contentWikilink = function ( attempt ) -- Retrieve span of wikilink between brackets -- Precondition: -- attempt -- string, with presumable link -- the first two chars are expected to be "[[" -- Postcondition: -- Returns string, number, number -- string including whitespace -- number with index of relevant "[[" -- number with index after relevant "]]" -- false if nothing found local r1 = false; local r2 = false; local r3 = attempt:find( "]]", 3, true ); if r3 then local s = attempt:sub( 3, r3 - 1 ); local i = s:find( "[[", 1, true ); if i then r1 = s:sub( i + 2 ); r2 = i; else r1 = s; r2 = 1; end end return r1, r2, r3; end -- contentWikilink() local extractExtlink = function ( attempt ) -- Retrieve external link -- Precondition: -- attempt -- string, with presumable link -- the first char is expected to be "[" -- Postcondition: -- Returns string, string -- first with target and title -- second result false if not titled -- false if nothing found local r1 = false; local r2 = false; local s = contentExtlink( attempt ); if s then local i = s:find( "%s", 1 ); if i then r1 = s:sub( 1, i - 1 ); r2 = mw.text.trim( s:sub( i + 1 ) ); if r2 == "" then r2 = false; end else r1 = s; end if r1 then r1 = mw.text.trim( r1 ); if r1 == "" or not utilURL().isResourceURL( r1 ) then r1 = false; end end if not r1 then r2 = false; end end return r1, r2; end -- extractExtlink() local extractWikilink = function ( attempt ) -- Retrieve wikilink -- Precondition: -- attempt -- string, with presumable link -- the first two chars are expected to be "[[" -- Postcondition: -- Returns string, string -- first with target -- second result title, or false if not piped -- false if nothing found local r1 = false; local r2 = false; local s = contentWikilink( attempt ); if s then local i = s:find( "|", 1, true ); if i then r1 = s:sub( 1, i - 1 ); r2 = s:sub( i + 1 ); else r1 = s; end r1 = mw.text.trim( r1 ); if r1 == "" then r1 = false; else r1 = r1:gsub( "_", " " ) :gsub( "&nbsp;", " " ) :gsub( "&thinsp;", " " ) :gsub( "&#160;", " " ) :gsub( "&#8239;", " " ) :gsub( " +", " " ); r1 = mw.text.decode( r1 ); end end return r1, r2; end -- extractWikilink() local prefix = function ( ask, ahead ) -- Interprete prefix of language or project type -- Precondition: -- ask -- string, with presumable prefix -- ahead -- true, if first segment -- Postcondition: -- Returns string,string or nil -- first string one of "lead", "lang", "project" -- second string is formatted value -- type is one of "lead", "lang", "project" -- nil if nothing found local r1, r2; local prefixes = { b = true, c = "commons", d = true, commons = true, m = "meta", mediawiki = "mw", mw = true, meta = true, n = true, q = true, s = true, simple = false, v = true, voy = true, w = true, wikibooks = "b", wikidata = "d", wikinews = "n", wikipedia = "w", wikiquote = "q", wikisource = "s", wikiversity = "v", wikivoyage = "voy", wikt = true, wiktionary = "wikt" }; local s = mw.text.trim( ask ); if s == "" then if ahead then r1 = "lead"; r2 = true; end else local p; s = s:lower(); p = prefixes[ s ]; if p == true then r1 = "project"; r2 = s; elseif p then r1 = "project"; r2 = p; elseif p == false then r1 = "lang"; r2 = s; elseif s:match( "^%l%l%l?$" ) and mw.language.isSupportedLanguage( s ) then r1 = "lang"; r2 = s; end end return r1, r2; end -- prefix() local target = function ( attempt, lonely ) -- Retrieve first target (wikilink or URL), or entire string -- Precondition: -- attempt -- string, with presumable link somewhere -- lonely -- remove fragment, if true -- Postcondition: -- Returns string, number -- string, with detected link target, or entire -- number, with number of brackets, if found, or 2 local r1, r2 = WLink.getTarget( attempt ); if not r1 then r1 = mw.text.trim( attempt ); r2 = 2; end if lonely then local i = r1:find( "#", 1, true ); if i == 1 then r1 = ""; elseif i then r1 = r1:sub( 1, i - 1 ); end end return r1, r2; end -- target() function WLink.ansiPercent( attempt, alter ) -- Convert string by ANSI encoding rather than UTF-8 encoding -- Precondition: -- attempt -- string, with presumable ANSI characters -- alter -- string or nil, to use for spaces instead of %20 -- Postcondition: -- Returns string, encoded local k, s; local r = attempt; if alter then r = r:gsub( " ", alter ); end for i = mw.ustring.len( r ), 1, -1 do k = mw.ustring.codepoint( r, i, i ); if k <= 32 or k > 126 then if k > 255 then s = mw.ustring.sub( r, i, i ); if k > 2047 then s = string.format( "%%%2X%%%2X%%%2X", s:byte( 1, 1 ), s:byte( 2, 2 ), s:byte( 3, 3 ) ); else s = string.format( "%%%2X%%%2X", s:byte( 1, 1 ), s:byte( 2, 2 ) ); end else s = string.format( "%%%2X", k ); end r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i - 1 ), s, mw.ustring.sub( r, i + 1 ) ); end end -- for --i r = mw.ustring.gsub(r, '^%*', '%%2A') return r; end -- WLink.ansiPercent() function WLink.formatURL( adjust ) -- Create bracketed link, if not yet -- Precondition: -- adjust -- string, with URL or domain/path or bracketed link -- Postcondition: -- Returns string, with bracketed link -- false on invalid format local r; if type( adjust ) == "string" then if WLink.isBracketedLink( adjust ) then r = adjust; else local url = mw.text.trim( adjust ); local host; utilURL(); host = URLutil.getHost( adjust ); if not host then url = "http://" .. adjust; host = URLutil.getHost( url ); end if host then local path = URLutil.getRelativePath( url ); local show; if path == "/" then if not url:match( "/$" ) then url = url .. "/"; end show = host; else local i = path:find( "#" ); if i then path = path:sub( 1, i - 1 ); end show = host .. path; end r = string.format( "[%s %s]", url, show ); else r = adjust; end end else r = false; end return r; end -- WLink.formatURL() function WLink.getArticleBase( attempt ) -- Retrieve generic article title, no fragment nor brackets -- Precondition: -- attempt -- string, with wikilink or page title -- current page title, if missing -- Postcondition: -- Returns string, with identified lemma, or all -- false on invalid format local r; if attempt then local m; r, m = target( attempt, true ); if m ~= 2 then r = false; end else r = mw.title.getCurrentTitle().text; end if r then local sub = r:match( "^(.*%S) *%(.+%)$" ); if sub then r = sub; end end return r; end -- WLink.getArticleBase() function WLink.getBaseTitle( attempt ) -- Retrieve last segment in subpage, no fragment -- Precondition: -- attempt -- string, with wikilink or page title -- Postcondition: -- Returns string, with identified segment, or all local r; local s, m = target( attempt, true ); if m == 2 then local sub = s:match( "/([^/]+)$" ); if sub then r = sub; else r = s; end else r = false; end return r; end -- WLink.getBaseTitle() function WLink.getEscapedTitle( attempt ) -- Retrieve escaped link title -- Precondition: -- attempt -- string, with presumable link title -- Postcondition: -- Returns string, with suitable link title local s = mw.text.trim( attempt ); return s:gsub( "\n", " " ) :gsub( "%[", "&#91;" ) :gsub( "%]", "&#93;" ) :gsub( "|", "&#124;" ); end -- WLink.getEscapedTitle() function WLink.getExtension( attempt ) -- Retrieve media extension -- Precondition: -- attempt -- string, with wikilink (media link) or page title -- if URL, PDF may be detected -- Postcondition: -- Returns string, with detected downcased media type -- false if no extension found local r = false; local s, m = target( attempt ); if m == 2 then s = s:match( "%.(%a+)$" ); if s then r = s:lower(); end elseif s:upper():match( "[%./](PDF)%W?" ) then r = "pdf"; end return r; end -- WLink.getExtension() function WLink.getFile( attempt ) -- Retrieve media page identifier -- Precondition: -- attempt -- string, with wikilink (media link) or page title -- Postcondition: -- Returns string, with detected file title -- no namespace nor project -- false if no file found local r = false; local s, m = target( attempt ); if m == 2 then local slow = ":" .. s:lower(); local find = function ( a ) local seek = string.format( ":%s:().+%%.%%a+$", a:lower() ); local join = slow:find( seek ); local ret; if join then ret = s:sub( join + #a + 1 ); end return ret; end; r = find( "file" ); if not r then local trsl = mw.site.namespaces[6]; r = find( trsl.name ); if not r then trsl = trsl.aliases; for k, v in pairs( trsl ) do r = find( v ); if r then break; -- for k, v end end -- for k, v end end end return r; end -- WLink.getFile() function WLink.getFragment( attempt ) -- Retrieve fragment -- Precondition: -- attempt -- string, with presumable fragment -- Postcondition: -- Returns string, with detected fragment -- false if no address found local r = false; local s, m = target( attempt ); if s then local i = s:find( "#", 1, true ); if i then if i > 1 then s = s:sub( i - 1 ); i = 2; end if s:find( "&#", 1, true ) then s = mw.text.decode( s ); i = s:find( "#", 1, true ); if not i then s = ""; i = 0; end end s = s:sub( i + 1 ); r = mw.text.trim( s ); if r == "" then r = false; elseif m == 2 then r = r:gsub( "%.(%x%x)", "%%%1" ) :gsub( "_", " " ); r = mw.uri.decode( r, "PATH" ); end end end return r; end -- WLink.getFragment() function WLink.getLanguage( attempt ) -- Retrieve language project identifier -- Precondition: -- attempt -- string, with wikilink or page title -- Postcondition: -- Returns string, with detected downcased language identifier -- false if no project language found local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.lang then r = w.lang; end end return r; end -- WLink.getLanguage() function WLink.getNamespace( attempt ) -- Retrieve namespace number -- Precondition: -- attempt -- string, with wikilink or page title -- Postcondition: -- Returns number, of detected namespace -- false if no namespace found local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and not w.lang and not w.project and w.ns then r = w.ns; end end return r; end -- WLink.getNamespace() function WLink.getPlain( attempt ) -- Retrieve text with all links replaced by link titles -- Precondition: -- attempt -- string, with wikitext -- Postcondition: -- Returns string, with modified wikitext without links local r = attempt; local i = 1; local j, k, n, lean, s, shift, space, suffix; while ( true ) do j = r:find( "[", i, true ); if j then suffix = r:sub( j ); i = j + 1; lean = ( r:byte( i, i ) == 91 ); if lean then s, k, n = contentWikilink( suffix ); else s, k, n = contentExtlink( suffix ); end if s then if k > 1 then n = n - k; i = j + k; j = i - 1; suffix = r:sub( j ); end if lean then s, shift = extractWikilink( suffix ); if s then space = s:match( "^([^:]+):" ); if space then space = mw.site.namespaces[ space ]; if space then space = space.id; end end if space == 6 or space == 14 then shift = ""; elseif not shift then shift = s; end else s = ""; shift = ""; end else s, shift = extractExtlink( suffix ); if not s then s = ""; end if not shift then shift = ""; end i = i - 1; end if j > 1 then s = r:sub( 1, j - 1 ); else s = ""; end r = string.format( "%s%s%s", s, shift, r:sub( n + i ) ); i = i + #shift; else break; -- while true end else break; -- while true end end -- while true return r; end -- WLink.getPlain() function WLink.getProject( attempt ) -- Retrieve wikifarm project identifier -- Precondition: -- attempt -- string, with wikilink or page title -- Postcondition: -- Returns string, with detected downcased project identifier -- false if no project identifier found local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.project then r = w.project; end end return r; end -- WLink.getProject() function WLink.getTarget( attempt ) -- Retrieve first target (wikilink or URL) -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns string, number -- string, with first detected link target -- number, with number of brackets, if found -- false if nothing found local r1 = false; local r2 = false; local i = attempt:find( "[", 1, true ); if i then local m; r1 = attempt:sub( i ); if r1:byte( 2, 2 ) == 91 then m = 2; r1 = extractWikilink( r1 ); else m = 1; r1 = extractExtlink( r1 ); end if r1 then r2 = m; end else r1 = attempt:match( "%A?([hf]t?tps?://%S+)%s?" ); if r1 then if utilURL().isResourceURL( r1 ) then r2 = 0; else r1 = false; end else r1 = false; end end return r1, r2; end -- WLink.getTarget() function WLink.getTargetPage( attempt ) -- Retrieve first target page (page name or URL of page) -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns string, with first detected linked page -- false if nothing found local r1, r2 = WLink.getTarget( attempt ); if r1 then local i = r1:find( "#", 1, true ); if i then if i == 1 then r1 = false; else r1 = mw.text.trim( r1:sub( 1, i - 1 ) ); end end end return r1, r2; end -- WLink.getTargetPage() function WLink.getTitle( attempt ) -- Retrieve first link title (wikilink or URL), or wikilink target -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns string, with first detected link target -- false if nothing found local r = false; local i = attempt:find( "[", 1, true ); if i then local s1, s2; r = attempt:sub( i ); if r:byte( 2, 2 ) == 91 then s1, s2 = extractWikilink( r ); if s2 then r = s2; else r = s1; end else s1, r = extractExtlink( r ); end end return r; end -- WLink.getTitle() function WLink.getWeblink( attempt, anURLutil ) -- Retrieve bracketed link from resource URL -- Precondition: -- attempt -- string, with URL, or something different -- anURLutil -- library module object, or nil -- Postcondition: -- Returns string, with first detected link target -- false if nothing found local second = ".ac.co.go.gv.or."; local r; if type( anURLutil ) == "table" then URLutil = anURLutil; else utilURL(); end if URLutil.isResourceURL( attempt ) then local site = URLutil.getAuthority( attempt ); local show; if #attempt == #site then site = site .. "/"; end show = URLutil.getTop3domain( "//" .. site ); if show then local scan = "[%./](%a+)(%.%l%l%.)(%a+)$"; local search = "." .. show; local s1, s2, s3 = search:match( scan ); if s2 then if not second:find( s2, 1, true ) then show = string.format( "%s.%s", s2, s3 ); end else show = false; end end if not show then show = URLutil.getTop2domain( "//" .. site ); if not show then show = URLutil.getHost( "//" .. site ); end end r = string.format( "[%s %s]", attempt, show ); else r = attempt; end return r; end -- WLink.getWeblink() function WLink.isBracketedLink( attempt ) -- Does attempt match a bracketed link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local i = attempt:find( "[", 1, true ); if i then local s = attempt:sub( i ); if s:byte( 2, 2 ) == 91 then s = extractWikilink( s ); else s = extractExtlink( s ); end if s then r = true; end end return r; end -- WLink.isBracketedLink() function WLink.isBracketedURL( attempt ) -- Does attempt match a bracketed URL? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local s, r = WLink.getTarget( attempt ); return ( r == 1 ); end -- WLink.isBracketedURL() function WLink.isCategorization( attempt ) -- Does attempt match a categorization? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.ns == 14 and not ( w.lead or w.lang or w.project ) and w.title ~= "" then r = true; end end return r; end -- WLink.isCategorization() function WLink.isExternalLink( attempt ) -- Does attempt match an external link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local s, r = WLink.getTarget( attempt ); if r then r = ( r < 2 ); end return r; end -- WLink.isExternalLink() function WLink.isInterlanguage( attempt ) -- Does attempt match an interlanguage link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.lang and not w.project and not w.lead and w.title ~= "" then r = true; end end return r; end -- WLink.isInterlanguage() function WLink.isInterwiki( attempt ) -- Does attempt match an interwiki link within wikifarm? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and ( w.lang or w.project ) and w.title ~= "" then r = true; end end return r; end -- WLink.isInterwiki() function WLink.isMedia( attempt ) -- Does attempt match a media translusion? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local s, m = WLink.getTarget( attempt ); if m == 2 then local w = WLink.wikilink( s ); if w and w.ns == 6 and not ( w.lead or w.lang or w.project ) and w.title ~= "" and WLink.getExtension( w.title ) then r = true; end end return r; end -- WLink.isMedia() function WLink.isTitledLink( attempt ) -- Does attempt match a titled link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local r = false; local i = attempt:find( "[", 1, true ); if i then local c, n; local s = attempt:sub( i ); if s:byte( 2, 2 ) == 91 then n = s:find( "%]%]", 5 ); c = "|"; else n = s:find( "%]", 8 ); c = "%s%S"; end if n then local m = s:find( c, 2 ); if m and m + 1 < n and WLink.getTarget( attempt ) then r = true; end end end return r; end -- WLink.isTitledLink() function WLink.isValidLink( attempt ) -- Does attempt match a link? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local s, r = WLink.getTarget( attempt ); if r then r = true; end return r; end -- WLink.isValidLink() function WLink.isWikilink( attempt ) -- Does attempt match a wikilink? -- Precondition: -- attempt -- string, with presumable link somewhere -- Postcondition: -- Returns boolean local s, m = WLink.getTarget( attempt ); return ( m == 2 ); end -- WLink.isWikilink() function WLink.wikilink( attempt ) -- Retrieve wikilink components -- Precondition: -- attempt -- string, with presumable link -- expected to be enclosed in "[[" "]]" -- else wikilink -- Postcondition: -- Returns table or false -- table of assignments with { type, value} -- type is one of "lead", -- "project", "lang", -- "ns", "space", "title" -- false if nothing found local s = contentWikilink( attempt ); local got, n, r; if not s then s = attempt; end i = s:find( "|", 1, true ); if i then s = s:sub( 1, i - 1 ); end got = mw.text.split( s, ":" ); n = table.maxn( got ); if n == 1 then r = { title = mw.text.trim( s ) }; else local j, k, o, v; r = { title = "" }; if n > 4 then k = 4; else k = n - 1; end j = k; for i = 1, j do s = mw.text.trim( got[ i ] ); if s ~= "" then o = mw.site.namespaces[ mw.text.trim( got[ i ] ) ]; if o then r.ns = o.id; r.space = o.name; k = i + 1; j = i - 1; break; -- for i end end end -- for i for i = 1, j do o, v = prefix( got[ i ], ( i == 1 ) ); if o then if r[ o ] then k = i; break; -- for i else r[ o ] = v; end else k = i; break; -- for i end end -- for i for i = k, n do r.title = r.title .. got[ i ]; if i < n then r.title = r.title .. ":"; end end -- for i end if r.lead and ( r.project or not r.title or ( not r.lang and r.ns ~= 6 and r.ns ~= 14 ) ) then r.lead = false; end return r; end -- WLink.wikilink() function WLink.failsafe( assert ) -- Retrieve versioning and check for compliance -- Precondition: -- assert -- string, with required version, or false -- Postcondition: -- Returns string with appropriate version, or false local r; if assert and assert > WLink.serial then r = false; else r = WLink.serial; end return r end -- WLink.failsafe() local function Template( frame, action, leave, lone ) -- Run actual code from template transclusion -- Precondition: -- frame -- object -- action -- string, with function name -- leave -- true: keep whitespace around -- lone -- true: permit call without parameters -- Postcondition: -- Return string; might be error message local lucky = true; local s = false; local r = false; local space; for k, v in pairs( frame.args ) do if k == 1 then if leave then s = v; else s = mw.text.trim( v ); end elseif action == "ansiPercent" and k == "space" then if v ~= "" then space = v; end elseif k ~= "template" then lucky = false; if r then r = r .. "|"; else r = "Unknown parameter: "; end r = string.format( "%s%s=", r, k ); end end -- for k, v if lucky then if s or lone then lucky, r = pcall( WLink[ action ], s, space ); else r = "Parameter missing"; lucky = false; end end if lucky then if type( r ) == "boolean" then if r then r = "1"; else r = ""; end end else r = string.format( "<span class=\"error\">%s</span>", r ); end return r; end -- Template() -- Export local p = { }; p.ansiPercent = function ( frame ) return Template( frame, "ansiPercent" ); end p.formatURL = function ( frame ) return Template( frame, "formatURL" ); end p.getArticleBase = function ( frame ) return Template( frame, "getArticleBase", false, true ); end p.getBaseTitle = function ( frame ) return Template( frame, "getBaseTitle" ); end p.getEscapedTitle = function ( frame ) return Template( frame, "getEscapedTitle" ); end p.getExtension = function ( frame ) return Template( frame, "getExtension" ); end p.getFile = function ( frame ) return Template( frame, "getFile" ); end p.getFragment = function ( frame ) return Template( frame, "getFragment" ); end p.getInterwiki = function ( frame ) return Template( frame, "getInterwiki" ); end p.getLanguage = function ( frame ) return Template( frame, "getLanguage" ); end p.getNamespace = function ( frame ) return tostring( Template( frame, "getNamespace" ) ); end p.getPlain = function ( frame ) return Template( frame, "getPlain" ); end p.getProject = function ( frame ) return Template( frame, "getProject" ); end p.getTarget = function ( frame ) return Template( frame, "getTarget" ); end p.getTargetPage = function ( frame ) return Template( frame, "getTargetPage" ); end p.getTitle = function ( frame ) return Template( frame, "getTitle" ); end p.getWeblink = function ( frame ) return Template( frame, "getWeblink" ); end p.isBracketedLink = function ( frame ) return Template( frame, "isBracketedLink" ); end p.isBracketedURL = function ( frame ) return Template( frame, "isBracketedURL" ); end p.isCategorization = function ( frame ) return Template( frame, "isCategorization" ); end p.isExternalLink = function ( frame ) return Template( frame, "isExternalLink" ); end p.isInterlanguage = function ( frame ) return Template( frame, "isInterlanguage" ); end p.isInterwiki = function ( frame ) return Template( frame, "isInterwiki" ); end p.isMedia = function ( frame ) return Template( frame, "isMedia" ); end p.isTitledLink = function ( frame ) return Template( frame, "isTitledLink" ); end p.isValidLink = function ( frame ) return Template( frame, "isValidLink" ); end p.isWeblink = function ( frame ) return Template( frame, "isWeblink" ); end p.isWikilink = function ( frame ) return Template( frame, "isWikilink" ); end p.failsafe = function ( frame ) local since = frame.args[ 1 ]; if since then since = mw.text.trim( since ); if since == "" then since = false; end end return WLink.failsafe( since ) or ""; end p.WLink = function () return WLink; end return p; af57214e9ddc77f93c9fcb1dd97b58d8180700d4 Template:Tnull 10 204 518 517 2024-02-08T00:30:48Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Tnull]] wikitext text/x-wiki #REDIRECT [[Template:Template link null]] {{Redirect category shell| {{R from move}} }} b22d666a4b16808dc3becc2403546fb9ab5dea7e Template:Template link null 10 205 520 519 2024-02-08T00:30:49Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_link_null]] wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tnull}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 2167c503e001d24d870ef82a9de0aaa9832404cb Template:Flowlist 10 206 522 521 2024-02-08T00:30:49Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Flowlist]] wikitext text/x-wiki <templatestyles src="Flowlist/styles.css" /><div class="flowlist {{{class|}}}" {{#if: {{{style|}}}|style="{{{style}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> 8fab8f03d7353b9e7ebe1b375ebbfc6801f60bdb Template:Flowlist/styles.css 10 207 524 523 2024-02-08T00:30:50Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Flowlist/styles.css]] sanitized-css text/css .flowlist ul { overflow-x: hidden; margin-left: 0; padding-left: 1.6em; } .flowlist ol { overflow-x: hidden; margin-left: 0; padding-left: 3.2em; } .flowlist dl { overflow-x: hidden; } 9e1541baa2f3cc3d7b4d7ac39f073f3a43a91c06 Template:Defn 10 208 526 525 2024-02-08T00:30:50Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Defn]] wikitext text/x-wiki <dd class="glossary {{{class|}}}" {{safesubst<noinclude/>:#if:{{{id|}}}|id="{{{id}}}"|{{safesubst<noinclude/>:#if:{{{term|}}}|id="{{{term}}}-defn{{{2|{{{no|1}}}}}}"|}}|}} {{safesubst<noinclude/>:#if:{{{style|}}}|style="{{{style}}}"|}}>{{safesubst<noinclude/>:#if:{{{2|{{{no|}}}}}}|{{{2|{{{no}}}}}}.&nbsp;&nbsp;|}}{{{defn|{{{1|{{{content}}}}}}}}}</dd><noinclude> {{Documentation}}<!--Categories go in the /doc subpage.--> </noinclude> 2df82518d4086f1630b1828aa60c6e82dbdee5a2 Template:Glossary 10 209 528 527 2024-02-08T00:30:50Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Glossary]] wikitext text/x-wiki <dl class="glossary {{{class|}}}" {{#if:{{{style|}}}|style="{{{style}}}"|}} {{#if:{{{id|}}}|id="{{{id}}}"|}}><noinclude>{{glossary end}} <!--Categories and interwikis go on the /doc page.--> {{Documentation}} </noinclude> afaf333b451c8bb5f581afb121ef9c3c5f8b7be8 Template:Glossary end 10 210 530 529 2024-02-08T00:30:51Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Glossary_end]] wikitext text/x-wiki <noinclude><dl></noinclude></dl><!--end glossary--><noinclude> {{Documentation|Template:Glossary/doc}}<!--Categories go in the /doc subpage.--> </noinclude> ed16ee7194c9e6e05c38ab0d43496928c52bc915 Template:Term 10 211 532 531 2024-02-08T00:30:51Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Term]] wikitext text/x-wiki <dt class="glossary {{{class|}}}" {{safesubst<noinclude/>:#if: {{{noid|}}}||id="{{safesubst<noinclude/>:#invoke:delink|delink|{{safesubst<noinclude/>:#invoke:String|replace|source={{safesubst<noinclude/>:lc:{{{id|{{{term|{{{1}}}}}}}}}}}|"|<!--blank to strip out double quote mark-->}}}}"}} style="{{safesubst<noinclude/>:#if:{{{multi|}}}|margin-top: -0.2em;|margin-top: 0.4em; {{{style|}}}}}">{{safesubst<noinclude/>:#if:{{{nondefining|}}}||<dfn class="glossary">}}{{{content|{{{2|{{{term|{{{1}}}}}}}}}}}}{{safesubst<noinclude/>:#if:{{{nondefining|}}}||</dfn>}}</dt><noinclude> {{Documentation}} </noinclude> ee17e48e6080c0ed3b54933f07c39046d852627f Module:Shortcut 828 212 534 533 2024-02-08T00:30:52Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Shortcut]] Scribunto text/plain -- This module implements {{shortcut}}. -- Set constants local CONFIG_MODULE = 'Module:Shortcut/config' -- Load required modules local checkType = require('libraryUtil').checkType local yesno = require('Module:Yesno') local p = {} local function message(msg, ...) return mw.message.newRawMessage(msg, ...):plain() end local function makeCategoryLink(cat) return string.format('[[%s:%s]]', mw.site.namespaces[14].name, cat) end function p._main(shortcuts, options, frame, cfg) checkType('_main', 1, shortcuts, 'table') checkType('_main', 2, options, 'table', true) options = options or {} frame = frame or mw.getCurrentFrame() cfg = cfg or mw.loadData(CONFIG_MODULE) local templateMode = options.template and yesno(options.template) local redirectMode = options.redirect and yesno(options.redirect) local isCategorized = not options.category or yesno(options.category) ~= false -- Validate shortcuts for i, shortcut in ipairs(shortcuts) do if type(shortcut) ~= 'string' or #shortcut < 1 then error(message(cfg['invalid-shortcut-error'], i), 2) end end -- Make the list items. These are the shortcuts plus any extra lines such -- as options.msg. local listItems = {} for i, shortcut in ipairs(shortcuts) do local templatePath, prefix if templateMode then -- Namespace detection local titleObj = mw.title.new(shortcut, 10) if titleObj.namespace == 10 then templatePath = titleObj.fullText else templatePath = shortcut end prefix = options['pre' .. i] or options.pre or '' end if options.target and yesno(options.target) then listItems[i] = templateMode and string.format("&#123;&#123;%s[[%s|%s]]&#125;&#125;", prefix, templatePath, shortcut) or string.format("[[%s]]", shortcut) else listItems[i] = frame:expandTemplate{ title = 'No redirect', args = templateMode and {templatePath, shortcut} or {shortcut, shortcut} } if templateMode then listItems[i] = string.format("&#123;&#123;%s%s&#125;&#125;", prefix, listItems[i]) end end end table.insert(listItems, options.msg) -- Return an error if we have nothing to display if #listItems < 1 then local msg = cfg['no-content-error'] msg = string.format('<strong class="error">%s</strong>', msg) if isCategorized and cfg['no-content-error-category'] then msg = msg .. makeCategoryLink(cfg['no-content-error-category']) end return msg end local root = mw.html.create() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Shortcut/styles.css'} }) -- Anchors local anchorDiv = root :tag('div') :addClass('module-shortcutanchordiv') for i, shortcut in ipairs(shortcuts) do local anchor = mw.uri.anchorEncode(shortcut) anchorDiv:tag('span'):attr('id', anchor) end -- Shortcut heading local shortcutHeading do local nShortcuts = #shortcuts if nShortcuts > 0 then local headingMsg = options['shortcut-heading'] or redirectMode and cfg['redirect-heading'] or cfg['shortcut-heading'] shortcutHeading = message(headingMsg, nShortcuts) shortcutHeading = frame:preprocess(shortcutHeading) end end -- Shortcut box local shortcutList = root :tag('div') :addClass('module-shortcutboxplain noprint') :attr('role', 'note') if options.float and options.float:lower() == 'left' then shortcutList:addClass('module-shortcutboxleft') end if options.clear and options.clear ~= '' then shortcutList:css('clear', options.clear) end if shortcutHeading then shortcutList :tag('div') :addClass('module-shortcutlist') :wikitext(shortcutHeading) end local ubl = require('Module:List').unbulleted(listItems) shortcutList:wikitext(ubl) return tostring(root) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame) -- Separate shortcuts from options local shortcuts, options = {}, {} for k, v in pairs(args) do if type(k) == 'number' then shortcuts[k] = v else options[k] = v end end -- Compress the shortcut array, which may contain nils. local function compressArray(t) local nums, ret = {}, {} for k in pairs(t) do nums[#nums + 1] = k end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end shortcuts = compressArray(shortcuts) return p._main(shortcuts, options, frame) end return p 03fd46a265e549852a9ed3d3a9249b247d84cb4f Module:Shortcut/config 828 213 536 535 2024-02-08T00:30:52Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Shortcut/config]] Scribunto text/plain -- This module holds configuration data for [[Module:Shortcut]]. return { -- The heading at the top of the shortcut box. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) ['shortcut-heading'] = '[[Wikipedia:Shortcut|{{PLURAL:$1|Shortcut|Shortcuts}}]]', -- The heading when |redirect=yes is given. It accepts the following parameter: -- $1 - the total number of shortcuts. (required) ['redirect-heading'] = '[[Wikipedia:Redirect|{{PLURAL:$1|Redirect|Redirects}}]]', -- The error message to display when a shortcut is invalid (is not a string, or -- is the blank string). It accepts the following parameter: -- $1 - the number of the shortcut in the argument list. (required) ['invalid-shortcut-error'] = 'shortcut #$1 was invalid (shortcuts must be ' .. 'strings of at least one character in length)', -- The error message to display when no shortcuts or other displayable content -- were specified. (required) ['no-content-error'] = 'Error: no shortcuts were specified and the ' .. mw.text.nowiki('|msg=') .. ' parameter was not set.', -- A category to add when the no-content-error message is displayed. (optional) ['no-content-error-category'] = 'Shortcut templates with missing parameters', } f9d1d94844d5953753eb19e30a3ce389eda3d319 Template:Format item 10 214 538 537 2024-02-08T00:30:52Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Format_item]] wikitext text/x-wiki <includeonly>{{#invoke:Item|format}}</includeonly><noinclude> {{doc}} </noinclude> 0de34fe93b7513b034123ce1c532fd0f2df896dc Template:Item 10 215 540 539 2024-02-08T00:30:53Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Item]] wikitext text/x-wiki <includeonly>{{#invoke:Item|pack}}</includeonly><noinclude> {{doc}} </noinclude> 2a8d49a45be839260ad83d33fa73c804d0a39e55 Template:Markup 10 216 542 541 2024-02-08T00:30:53Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Markup]] wikitext text/x-wiki <includeonly>{| style="{{#if:{{{width|}}}|width:{{{width}}};}} margin-top:0;margin-left:{{{margin-left|{{{margin|0}}}}}}; border-width:medium; padding:0; {{{style|}}}" {{#if:{{{title|}}} |{{!}}+ '''{{{title}}}'''}} {{#if:{{{noheaders|}}}{{{notitle|}}} | |! scope="col" style="width:50%;{{{colheaderstyle|}}}{{{col1headerstyle|}}}"{{!}} {{{col1|{{{t1|Markup}}}}}} {{!!}}<!-- -->scope="col" style="width:50%;{{{colheaderstyle|}}}{{{col2headerstyle|}}}"{{!}} {{{col2|{{{t2|Renders as}}}}}} }}<!-- -->{{For loop||call=format item|pc1n=template|pc1v=Markup/row|pc2n=c1style|pc2v={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|pc3n=c2style|pc3v={{{col2style|{{{outputstyle|}}}}}}|pv=item|{{item|c1={{{1|}}}|c2={{{2|}}}}}|{{item|c1={{{3|}}}|c2={{{4|}}}}}|{{item|c1={{{5|}}}|c2={{{6|}}}}}|{{item|c1={{{7|}}}|c2={{{8|}}}}}|{{item|c1={{{9|}}}|c2={{{10|}}}}}|{{item|c1={{{11|}}}|c2={{{12|}}}}}|{{item|c1={{{13|}}}|c2={{{14|}}}}}|{{item|c1={{{15|}}}|c2={{{16|}}}}}|{{item|c1={{{17|}}}|c2={{{18|}}}}}|{{item|c1={{{19|}}}|c2={{{20|}}}}}|{{item|c1={{{21|}}}|c2={{{22|}}}}}|{{item|c1={{{23|}}}|c2={{{24|}}}}}|{{item|c1={{{25|}}}|c2={{{26|}}}}}|{{item|c1={{{27|}}}|c2={{{28|}}}}}|{{item|c1={{{29|}}}|c2={{{30|}}}}}|{{item|c1={{{31|}}}|c2={{{32|}}}}}|{{item|c1={{{33|}}}|c2={{{34|}}}}}|{{item|c1={{{35|}}}|c2={{{36|}}}}}|{{item|c1={{{37|}}}|c2={{{38|}}}}}|{{item|c1={{{39|}}}|c2={{{40|}}}}}}} |- |style="border-width:1px;border-style: none none none;border-color:#ddd; padding:5px; vertical-align:top;"| |style="border-width:1px;border-style: none none none;border-color:#ddd; padding:5px; vertical-align:top;"| |}</includeonly><noinclude> {{Documentation}} </noinclude> 8f9e78df3cd9801aa6cb36c463195df132394e9a Template:Markup/row 10 217 544 543 2024-02-08T00:30:53Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Markup/row]] wikitext text/x-wiki <noinclude>{| style="border-width:medium;"</noinclude><includeonly>{{#if:{{{c1|value}}}|&#32; {{!-}} {{!}}style{{=}}"background:#f8f9fa ; border:1px solid #eaecf0 ; padding:9px 5px 5px; vertical-align:top;"{{!}} <!-- -->{{#tag:pre |{{{c1|[markup]}}}|style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap; {{{c1style|}}}"}} {{!}}style{{=}}"background:#f8f9fa ; border:1px solid #eaecf0 ; padding:5px; vertical-align:top;"{{!}} <!-- --><div style="{{{c2style|}}}"> {{{c2|[''rendering'']}}} </div> }}</includeonly><!-- --><noinclude> |- |style="border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:text-top;"| |style="border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:text-top;"| |- |}{{Documentation}}</noinclude> 0fa88a4f848315c0f4a50447fdb8fa334e4b38e7 Module:Item 828 218 546 545 2024-02-08T00:30:54Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Item]] Scribunto text/plain local p = {} local function escape(str) return str:gsub("[|\\]", function (c) return string.format("\\%03d", c:byte()) end) end local function unescape(str) return str:gsub("\\(%d%d%d)", function (d) return string.char(d) end) end -- Implements [[Template:Item]] function p.pack(frame) local parent = frame:getParent() local result = '' for key, value in pairs(parent.args) do result = result .. "|" .. escape(tostring(key)) .. "|" .. escape(value) end return result .. "|"; end local function unpack(str) local result = { } for key, value in str:gfind("|([^|]*)|([^|]*)") do result[unescape(key)] = unescape(value) end return result end -- Implements [[Template:Component]] function p.component(frame) return unpack(frame.args[1])[frame.args[2]] end local function getItems(frame) return frame:getParent().args end local function invert(tbl) local result = { } for key, value in pairs(tbl) do result[value] = key end return result end -- Add args into item as appropriate (see [[Template:Format item]]) local function addArgs( item, -- unpacked item to modify args, -- arguments for adding into item ignore, -- pass in invert{keys to ignore} shift -- for numbered arguments, args[key+shift] is assigned to item[key] -- returns: item ) for key, value in pairs(args) do if not ignore[key] then local _, _, paramKey = string.find(key, "^param (.*)") local _, _, importantKey = string.find(key, "^important (.*)") paramKey = paramKey or importantKey or key if shift and type(paramKey) == "number" then paramKey = paramKey - shift if paramKey < 1 then paramKey = nil end end if paramKey and (importantKey or item[paramKey] == nil) then item[paramKey] = value end end end return item end -- Implements [[Template:Format item]] function p.format(frame) local args = frame:getParent().args local ignore = invert{ "template", "item" } local templateArgs = addArgs(unpack(args.item), args, ignore) return frame:expandTemplate{ title = args.template, args = templateArgs } end -- See [[Template:Item#Format each item using a template]] function p.each(frame) local args = frame.args local items = getItems(frame) local separator = args[1] or "" local prepend = args[2] or "" local append = args[3] or "" local ignore = invert{ "template" } local shift = 3 local result = "" for i, item in ipairs(items) do local templateArgs = addArgs(unpack(item), args, ignore, shift) result = result .. prepend .. frame:expandTemplate{ title = args.template, args = templateArgs } .. append if items[i + 1] then result = result .. separator end end return result end -- See [[Template:Item#Gather given parameter from all items]] function p.gather(frame) local args = frame.args local items = getItems(frame) local parameter = args.parameter or "1" local templateArgs = { } for i, item in ipairs(items) do templateArgs[i] = unpack(item)[parameter] end return frame:expandTemplate{ title = args.template, args = templateArgs } end return p 46e61b1549d18c301bcc79ecd120a0aa790f8894 Template:Template shortcut 10 219 548 547 2024-02-08T00:30:56Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Template_shortcut]] wikitext text/x-wiki <includeonly>{{#invoke:Shortcut|main|template=yes}}</includeonly><noinclude>{{Documentation}}</noinclude> bfb2889c4c0ec36294b7b667f5e03350d2df680e Template:Uses TemplateStyles 10 80 550 198 2024-02-08T00:30:56Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Uses_TemplateStyles]] wikitext text/x-wiki <div style="width:250px;float:right;clear:right;margin:0 0 1em 1em;border:1px solid black;-moz-border-radius:10px;-webkit-border-radius:10px;padding:10px 10px 10px 10px; background:#FFFFFF;"> <p style="margin:0 3% 0 3%;text-align:center;font-size:94%"> [[File:Farm-Fresh css add.svg|left|30px]] '''This template uses [[Help:TemplateStyles|TemplateStyles]]''' <br /> {{{1|}}} </p></div><includeonly>{{#ifeq:{{SUBPAGENAME}}|doc||[[Category:Templates that use TemplateStyles|{{PAGENAME}}]]}}</includeonly><noinclude> {{clr}} {{Documentation}}</noinclude> fed44ca463856190bcf6280438ed7ea020ad82c3 Module:Uses TemplateStyles 828 220 552 551 2024-02-08T00:30:56Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Uses_TemplateStyles]] Scribunto text/plain local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg, ...) return TNT.format('I18n/Uses TemplateStyles', msg, ...) end local function getConfig() return mw.loadData('Module:Uses TemplateStyles/config') end local function renderBox(tStyles) local boxArgs = { type = 'notice', small = true, image = string.format('[[File:Farm-Fresh css add.svg|32px|alt=%s]]', format('logo-alt')) } if #tStyles < 1 then boxArgs.text = string.format('<strong class="error">%s</strong>', format('error-emptylist')) else local cfg = getConfig() local tStylesLinks = {} for i, ts in ipairs(tStyles) do local link = string.format('[[:%s]]', ts) local sandboxLink = nil local tsTitle = mw.title.new(ts) if tsTitle and cfg['sandbox_title'] then local tsSandboxTitle = mw.title.new(string.format( '%s:%s/%s/%s', tsTitle.nsText, tsTitle.baseText, cfg['sandbox_title'], tsTitle.subpageText)) if tsSandboxTitle and tsSandboxTitle.exists then sandboxLink = format('sandboxlink', link, ':' .. tsSandboxTitle.prefixedText) end end tStylesLinks[i] = sandboxLink or link end local tStylesList = mList.makeList('bulleted', tStylesLinks) boxArgs.text = format( mw.title.getCurrentTitle():inNamespaces(828,829) and 'header-module' or 'header-template') .. '\n' .. tStylesList end return mMessageBox.main('mbox', boxArgs) end local function renderTrackingCategories(args, tStyles, titleObj) if yesno(args.nocat) then return '' end local cfg = getConfig() local cats = {} -- Error category if #tStyles < 1 and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- TemplateStyles category titleObj = titleObj or mw.title.getCurrentTitle() if (titleObj.namespace == 10 or titleObj.namespace == 828) and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category or cfg['default_category'] if category then cats[#cats + 1] = category end if not yesno(args.noprotcat) and (cfg['protection_conflict_category'] or cfg['padlock_pattern']) then local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil local addedLevelCat = false local addedPadlockCat = false for i, ts in ipairs(tStyles) do local tsTitleObj = mw.title.new(ts) local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then local content = tsTitleObj:getContent() if not content:find(cfg['padlock_pattern']) then cats[#cats + 1] = cfg['missing_padlock_category'] addedPadlockCat = true end end if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then currentProt = cfg['protection_hierarchy'][currentProt] or 0 tsProt = cfg['protection_hierarchy'][tsProt] or 0 if tsProt < currentProt then addedLevelCat = true cats[#cats + 1] = cfg['protection_conflict_category'] end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end function p._main(args, cfg) local tStyles = mTableTools.compressSparseArray(args) local box = renderBox(tStyles) local trackingCategories = renderTrackingCategories(args, tStyles) return box .. trackingCategories end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 71ca57c37849f38e3c5ee30061bdae730963e48e Module:Uses TemplateStyles/config 828 221 554 553 2024-02-08T00:30:57Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Uses_TemplateStyles/config]] Scribunto text/plain local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpage_blacklist'] = { ['doc'] = true, ['sandbox'] = true, ['sandbox2'] = true, ['testcases'] = true, } -- Sandbox title: if the stylesheet’s title is <template>/<stylesheet>.css, the -- stylesheet’s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css -- Set to nil to disable sandbox links. cfg['sandbox_title'] = 'sandbox' -- Error category: this category is added if the module call contains errors -- (e.g. no stylesheet listed). A category name without namespace, or nil -- to disable categorization (not recommended). cfg['error_category'] = 'Uses TemplateStyles templates with errors' -- Default category: this category is added if no custom category is specified -- in module/template call. A category name without namespace, or nil -- to disable categorization. cfg['default_category'] = 'Templates using TemplateStyles' -- Protection conflict category: this category is added if the protection level -- of any stylesheet is lower than the protection level of the template. A category name -- without namespace, or nil to disable categorization (not recommended). cfg['protection_conflict_category'] = 'Templates using TemplateStyles with a different protection level' -- Hierarchy of protection levels, used to determine whether one protection level is lower -- than another and thus should populate protection_conflict_category. No protection is treated as zero cfg['protection_hierarchy'] = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } -- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil -- to disable padlock check. cfg['padlock_pattern'] = '{{pp-' -- Missing padlock category: this category is added if a protected stylesheet -- doesn’t contain any padlock template (specified by the above Lua pattern). -- A category name without namespace (no nil allowed) if the pattern is not nil, -- unused (and thus may be nil) otherwise. cfg['missing_padlock_category'] = 'Templates using TemplateStyles without padlocks' return cfg -- Don’t touch this line. 58e7a37c44f6ea3f6b8af54a559d696cc7256493 Template:Format TemplateData 10 222 556 555 2024-02-08T00:30:57Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Format_TemplateData]] wikitext text/x-wiki <includeonly>{{#ifeq:{{yesno-yes|{{{header}}}}}|yes|{{TemplateData header}} }}{{#invoke:Format TemplateData| f |classNoNumTOC=nonumtoc |cssParams=border:#B3B7FF 1px solid;|docpageCreate=%s/doc |docpageDetect=/doc$ |msgDescMiss=Missing description |cat=Templates with TemplateData errors}}</includeonly><noinclude> {{Documentation}} </noinclude> 9f91faf4253ddd2a7da1f06be8940e26509a0cd6 Module:Format TemplateData 828 223 558 557 2024-02-08T00:30:58Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Format_TemplateData]] Scribunto text/plain local TemplateData = { suite = "TemplateData", serial = "2022-03-10", item = 46997995 } --[==[ improve template:TemplateData ]==] local Failsafe = TemplateData local Config = { -- multiple option names mapped into unique internal fields basicCnf = { catProblem = "strange", classMultiColumns = "selMultClm", classNoNumTOC = "suppressTOCnum", classTable = "classTable", cssParWrap = "cssTabWrap", cssParams = "cssTable", docpageCreate = "suffix", docpageDetect = "subpage", helpBoolean = "support4boolean", helpContent = "support4content", helpDate = "support4date", helpFile = "support4wiki-file-name", helpFormat = "supportFormat", helpLine = "support4line", helpNumber = "support4number", helpPage = "support4wiki-page-name", helpString = "support4string", helpTemplate = "support4wiki-template-name", helpURL = "support4url", helpUser = "support4wiki-user-name", msgDescMiss = "solo", tStylesTOCnum = "stylesTOCnum", tStylesMultiColumns = "stylesMultClm" }, classTable = { "wikitable" }, -- classes for params table debugmultilang = "C0C0C0", loudly = false, -- show exported element, etc. solo = false, -- complaint on missing description strange = false, -- title of maintenance category cssTable = false, -- styles for params table cssTabWrap = false, -- styles for params table wrapper debug = false, subpage = false, -- pattern to identify subpage suffix = false, -- subpage creation scheme suppressTOCnum = false, -- class for TOC number suppression jsonDebug = "json-code-lint" -- class for jsonDebug tool } local Data = { div = false, -- <div class="mw-templatedata-doc-wrap"> got = false, -- table, initial templatedata object heirs = false, -- table, params that are inherited jump = false, -- source position at end of "params" less = false, -- main description missing lasting = false, -- old syntax encountered lazy = false, -- doc mode; do not generate effective <templatedata> leading = false, -- show TOC -- low = false, -- 1= mode order = false, -- parameter sequence params = false, -- table, exported parameters scream = false, -- error messages sibling = false, -- TOC juxtaposed slang = nil, -- project/user language code slim = false, -- JSON reduced to plain source = false, -- JSON input strip = false, -- <templatedata> evaluation tag = false, -- table, exported root element title = false, -- page tree = false -- table, rewritten templatedata object } local Permit = { builder = { after = "block", align = "block", block = "block", compressed = "block", dense = "block", grouped = "inline", half = "inline", indent = "block", inline = "inline", last = "block", lead = "block", newlines = "*", spaced = "inline" }, colors = { bg = "FFFFFF", fg = "000000", tableheadbg = "B3B7FF", required = "EAF3FF", suggested = "FFFFFF", optional = "EAECF0", deprecated = "FFCBCB" }, params = { aliases = "table", autovalue = "string", default = "string table I18N nowiki", deprecated = "boolean string I18N", description = "string table I18N", example = "string table I18N nowiki", label = "string table I18N", inherits = "string", required = "boolean", style = "string table", suggested = "boolean", suggestedvalues = "string table number boolean", type = "string" }, root = { description = "string table I18N", format = "string", maps = "table", params = "table", paramOrder = "table", sets = "table" }, search = "[{,]%%s*(['\"])%s%%1%%s*:%%s*%%{", types = { boolean = true, content = true, date = true, line = true, number = true, string = true, unknown = true, url = true, ["wiki-file-name"] = true, ["wiki-page-name"] = true, ["wiki-template-name"] = true, ["wiki-user-name"] = true, ["unbalanced-wikitext"] = true, ["string/line"] = "line", ["string/wiki-page-name"] = "wiki-page-name", ["string/wiki-user-name"] = "wiki-user-name" } } local function Fault( alert ) -- Memorize error message -- Parameter: -- alert -- string, error message if Data.scream then Data.scream = string.format( "%s *** %s", Data.scream, alert ) else Data.scream = alert end end -- Fault() local function Fetch( ask, allow ) -- Fetch module -- Parameter: -- ask -- string, with name -- "/global" -- "Multilingual" -- "Text" -- "WLink" -- allow -- true: no error if unavailable -- Returns table of module -- error: Module not available local sign = ask local r, stem if sign:sub( 1, 1 ) == "/" then sign = TemplateData.frame:getTitle() .. sign else stem = sign sign = "Module:" .. stem end if TemplateData.extern then r = TemplateData.extern[ sign ] else TemplateData.extern = { } end if not r then local lucky, g = pcall( require, sign ) if type( g ) == "table" then if stem and type( g[ stem ] ) == "function" then r = g[ stem ]() else r = g end TemplateData.extern[ sign ] = r elseif not allow then error( string.format( "Fetch(%s) %s", sign, g ), 0 ) end end return r end -- Fetch() local function Foreign() -- Guess human language -- Returns slang, or not if type( Data.slang ) == "nil" then local Multilingual = Fetch( "Multilingual", true ) if Multilingual and type( Multilingual.userLangCode ) == "function" then Data.slang = Multilingual.userLangCode() else Data.slang = mw.language.getContentLanguage():getCode() :lower() end end if Data.slang and mw.ustring.codepoint( Data.slang, 1, 1 ) > 122 then Data.slang = false end return Data.slang end -- Foreign() local function facet( ask, at ) -- Find physical position of parameter definition in JSON -- Parameter: -- ask -- string, parameter name -- at -- number, physical position within definition -- Returns number, or nil local seek = string.format( Permit.search, ask:gsub( "%%", "%%%%" ) :gsub( "([%-.()+*?^$%[%]])", "%%%1" ) ) local i, k, r, slice, source if not Data.jump then Data.jump = Data.source:find( "params", 2 ) if Data.jump then Data.jump = Data.jump + 7 else Data.jump = 1 end end i, k = Data.source:find( seek, at + Data.jump ) while i and not r do source = Data.source:sub( k + 1 ) slice = source:match( "^%s*\"([^\"]+)\"s*:" ) if not slice then slice = source:match( "^%s*'([^']+)'%s*:" ) end if ( slice and Permit.params[ slice ] ) or source:match( "^%s*%}" ) then r = k else i, k = Data.source:find( seek, k ) end end -- while i return r end -- facet() local function facilities( apply ) -- Retrieve details of suggestedvalues -- Parameter: -- apply -- table, with plain or enhanced values -- .suggestedvalues -- table|string|number, or more -- Returns -- 1 -- table, with suggestedvalues -- 2 -- table, with CSS map, or not -- 3 -- string, with class, or not -- 4 -- string, with templatestyles, or not local elements = apply.suggestedvalues local s = type( elements ) local r1, r2, r3, r4 if s == "table" then local values = elements.values if type( values ) == "table" then r1 = values if type( elements.scroll ) == "string" then r2 = r2 or { } r2.height = apply.scroll r2.overflow = "auto" end if type( elements.minwidth ) == "string" then local s = type( elements.maxcolumns ) r2 = r2 or { } r2["column-width"] = elements.minwidth if s == "string" or s == "number" then s = tostring( elements.maxcolumns ) r2["column-count"] = s end if type( Config.selMultClm ) == "string" then r3 = Config.selMultClm end if type( Config.stylesMultClm ) == "string" then local src = Config.stylesMultClm .. "/styles.css" r4 = TemplateData.frame :extensionTag( "templatestyles", nil, { src = src } ) end end elseif elements and elements ~= "" then r1 = elements end elseif s == "string" then s = mw.text.trim( about ) if s ~= "" then r1 = { } table.insert( r1, { code = s } ) end elseif s == "number" then r1 = { } table.insert( r1, { code = tostring( elements ) } ) end return r1, r2, r3, r4 end -- facilities() local function factory( adapt ) -- Retrieve localized text from system message -- Parameter: -- adapt -- string, message ID after "templatedata-" -- Returns string, with localized text local o = mw.message.new( "templatedata-" .. adapt ) if Foreign() then o:inLanguage( Data.slang ) end return o:plain() end -- factory() local function faculty( adjust ) -- Test template arg for boolean -- adjust -- string or nil -- Returns boolean local s = type( adjust ) local r if s == "string" then r = mw.text.trim( adjust ) r = ( r ~= "" and r ~= "0" ) elseif s == "boolean" then r = adjust else r = false end return r end -- faculty() local function failures() -- Retrieve error collection and category -- Returns string local r if Data.scream then local e = mw.html.create( "span" ) :addClass( "error" ) :wikitext( Data.scream ) r = tostring( e ) mw.addWarning( "'''TemplateData'''<br />" .. Data.scream ) if Config.strange then r = string.format( "%s[[category:%s]]", r, Config.strange ) end else r = "" end return r end -- failures() local function fair( adjust ) -- Reduce text to one line of plain text, or noexport wikitext blocks -- adjust -- string -- Returns string, with adjusted text local f = function ( a ) return a:gsub( "%s*\n%s*", " " ) :gsub( "%s%s+", " " ) end local tags = { { start = "<noexport>", stop = "</noexport>" }, { start = "<exportonly>", stop = "</exportonly>", l = false } } local r = adjust local i, j, k, s, tag for m = 1, 2 do tag = tags[ m ] if r:find( tag.start, 1, true ) then s = r r = "" i = 1 tag.l = true j, k = s:find( tag.start, i, true ) while j do if j > 1 then r = r .. f( s:sub( i, j - 1 ) ) end i = k + 1 j, k = s:find( tag.stop, i, true ) if j then if m == 1 then r = r .. s:sub( i, j - 1 ) end i = k + 1 j, k = s:find( tag.start, i, true ) else Fault( "missing " .. tag.stop ) end end -- while j r = r .. s:sub( i ) elseif m == 1 then r = f( r ) end end -- for m if tags[ 2 ].l then r = r:gsub( "<exportonly>.*</exportonly>", "" ) end return r end -- fair() local function fancy( advance, alert ) -- Present JSON source -- Parameter: -- advance -- true, for nice -- alert -- true, for visible -- Returns string local r if Data.source then local support = Config.jsonDebug local css if advance then css = { height = "6em", resize = "vertical" } r = { [ 1 ] = "syntaxhighlight", [ 2 ] = Data.source, lang = "json", style = table.concat( css, ";" ) } if alert then r.class( support ) end r = TemplateData.frame:callParserFunction( "#tag", r ) else css = { [ "font-size" ] = "77%", [ "line-height" ] = "1.35" } if alert then css.resize = "vertical" else css.display = "none" end r = mw.html.create( "pre" ) :addClass( support ) :css( css ) :wikitext( mw.text.encode( Data.source ) ) r = tostring( r ) end r = "\n".. r else r = "" end return r end -- fancy() local function faraway( alternatives ) -- Retrieve best language version from multilingual text -- Parameter: -- alternatives -- table, to be evaluated -- Returns -- 1 -- string, with best match -- 2 -- table of other versions, if any local n = 0 local variants = { } local r1, r2 for k, v in pairs( alternatives ) do if type( v ) == "string" then v = mw.text.trim( v ) if v ~= "" and type( k ) == "string" then k = k:lower() variants[ k ] = v n = n + 1 end end end -- for k, v if n > 0 then local Multilingual = Fetch( "Multilingual", true ) if Multilingual and type( Multilingual.i18n ) == "function" then local show, slang = Multilingual.i18n( variants ) if show then r1 = show variants[ slang ] = nil r2 = variants end end if not r1 then Foreign() for k, v in pairs( variants ) do if n == 1 then r1 = v elseif Data.slang == k then variants[ k ] = nil r1 = v r2 = variants end end -- for k, v end if r2 and Multilingual then for k, v in pairs( r2 ) do if v and not Multilingual.isLang( k, true ) then Fault( string.format( "%s <code>lang=%s</code>", "Invalid", k ) ) end end -- for k, v end end return r1, r2 end -- faraway() local function fashioned( about, asked, assign ) -- Create description head -- Parameter: -- about -- table, supposed to contain description -- asked -- true, if mandatory description -- assign -- <block>, if to be equipped -- Returns <block>, with head, or nil local para = assign or mw.html.create( "div" ) local plus, r if about and about.description then if type( about.description ) == "string" then para:wikitext( about.description ) else para:wikitext( about.description[ 1 ] ) plus = mw.html.create( "ul" ) plus:css( "text-align", "left" ) for k, v in pairs( about.description[ 2 ] ) do plus:node( mw.html.create( "li" ) :node( mw.html.create( "code" ) :wikitext( k ) ) :node( mw.html.create( "br" ) ) :wikitext( fair( v ) ) ) end -- for k, v if Config.loudly then plus = mw.html.create( "div" ) :css( "background-color", "#" .. Config.debugmultilang ) :node( plus ) else plus:addClass( "templatedata-maintain" ) :css( "display", "none" ) end end elseif Config.solo and asked then para:addClass( "error" ) :wikitext( Config.solo ) Data.less = true else para = false end if para then if plus then r = mw.html.create( "div" ) :node( para ) :node( plus ) else r = para end end return r end -- fashioned() local function fatten( access ) -- Create table row for sub-headline -- Parameter: -- access -- string, with name -- Returns <tr> local param = Data.tree.params[ access ] local sub, sort = access:match( "(=+)%s*(%S.*)$" ) local headline = mw.html.create( string.format( "h%d", #sub ) ) local r = mw.html.create( "tr" ) local td = mw.html.create( "td" ) :attr( "colspan", "5" ) :attr( "data-sort-value", "!" .. sort ) local s if param.style then s = type( param.style ) if s == "table" then td:css( param.style ) elseif s == "string" then td:cssText( param.style ) end end s = fashioned( param, false, headline ) if s then headline = s else headline:wikitext( sort ) end td:node( headline ) r:node( td ) return r end -- fatten() local function fathers() -- Merge params with inherited values local n = 0 local p = Data.params local t = Data.tree.params local p2, t2 for k, v in pairs( Data.heirs ) do n = n + 1 end -- for k, v for i = 1, n do if Data.heirs then for k, v in pairs( Data.heirs ) do if v and not Data.heirs[ v ] then n = n - 1 t[ k ].inherits = nil Data.heirs[ k ] = nil p2 = { } t2 = { } if p[ v ] then for k2, v2 in pairs( p[ v ] ) do p2[ k2 ] = v2 end -- for k2, v2 if p[ k ] then for k2, v2 in pairs( p[ k ] ) do if type( v2 ) ~= "nil" then p2[ k2 ] = v2 end end -- for k2, v2 end p[ k ] = p2 for k2, v2 in pairs( t[ v ] ) do t2[ k2 ] = v2 end -- for k2, v2 for k2, v2 in pairs( t[ k ] ) do if type( v2 ) ~= "nil" then t2[ k2 ] = v2 end end -- for k2, v2 t[ k ] = t2 else Fault( "No params[] inherits " .. v ) end end end -- for k, v end end -- i = 1, n if n > 0 then local s for k, v in pairs( Data.heirs ) do if v then if s then s = string.format( "%s &#124; %s", s, k ) else s = "Circular inherits: " .. k end end end -- for k, v Fault( s ) end end -- fathers() local function favorize() -- Local customization issues local boole = { ["font-size"] = "125%" } local l, cx = pcall( mw.loadData, TemplateData.frame:getTitle() .. "/config" ) local scripting, style TemplateData.ltr = not mw.language.getContentLanguage():isRTL() if TemplateData.ltr then scripting = "left" else scripting = "right" end boole[ "margin-" .. scripting ] = "3em" Permit.boole = { [false] = { css = boole, lead = true, show = "&#x2610;" }, [true] = { css = boole, lead = true, show = "&#x2611;" } } Permit.css = { } for k, v in pairs( Permit.colors ) do if k == "tableheadbg" then k = "tablehead" end if k == "fg" then style = "color" else style = "background-color" end Permit.css[ k ] = { } Permit.css[ k ][ style ] = "#" .. v end -- for k, v if type( cx ) == "table" then local c, s if type( cx.permit ) == "table" then if type( cx.permit.boole ) == "table" then if type( cx.permit.boole[ true ] ) == "table" then Permit.boole[ false ] = cx.permit.boole[ false ] end if type( cx.permit.boole[ true ] ) == "table" then Permit.boole[ true ] = cx.permit.boole[ true ] end end if type( cx.permit.css ) == "table" then for k, v in pairs( cx.permit.css ) do if type( v ) == "table" then Permit.css[ k ] = v end end -- for k, v end end for k, v in pairs( Config.basicCnf ) do s = type( cx[ k ] ) if s == "string" or s == "table" then Config[ v ] = cx[ k ] end end -- for k, v end if type( Config.subpage ) ~= "string" or type( Config.suffix ) ~= "string" then local got = mw.message.new( "templatedata-doc-subpage" ) local suffix if got:isDisabled() then suffix = "doc" else suffix = got:plain() end if type( Config.subpage ) ~= "string" then Config.subpage = string.format( "/%s$", suffix ) end if type( Config.suffix ) ~= "string" then Config.suffix = string.format( "%%s/%s", suffix ) end end end -- favorize() local function feasible( all, at, about ) -- Deal with suggestedvalues within parameter -- Parameter: -- all -- parameter details -- .default -- .type -- at -- string, with parameter name -- about -- suggestedvalues -- table, -- value and possibly description -- table may have elements: -- .code -- mandatory -- .label -- table|string -- .support -- table|string -- .icon -- string -- .class -- table|string -- .css -- table -- .style -- string -- .less -- true: suppress code -- Returns -- 1: mw.html object <ul> -- 2: sequence table with values, or nil local h = { } local e, r1, r2, s, v if #about > 0 then for i = 1, #about do e = about[ i ] s = type( e ) if s == "table" then if type( e.code ) == "string" then s = mw.text.trim( e.code ) if s == "" then e = nil else e.code = s end else e = nil s = string.format( "params.%s.%s[%d] %s", at, "suggestedvalues", i, "MISSING 'code:'" ) end elseif s == "string" then s = mw.text.trim( e ) if s == "" then e = nil s = string.format( "params.%s.%s[%d] EMPTY", at, "suggestedvalues", i ) Fault( s ) else e = { code = s } end elseif s == "number" then e = { code = tostring( e ) } else s = string.format( "params.%s.%s[%d] INVALID", at, "suggestedvalues", i ) Fault( s ) e = false end if e then v = v or { } table.insert( v, e ) if h[ e.code ] then s = string.format( "params.%s.%s REPEATED %s", at, "suggestedvalues", e.code ) Fault( s ) else h[ e.code ] = true end end end -- for i else Fault( string.format( "params.%s.suggestedvalues %s", at, "NOT AN ARRAY" ) ) end if v then local code, d, k, less, story, swift, t, u r1 = mw.html.create( "ul" ) r2 = { } for i = 1, #v do u = mw.html.create( "li" ) e = v[ i ] table.insert( r2, e.code ) story = false less = ( e.less == true ) if not less then swift = e.code if e.support then local scream, support s = type( e.support ) if s == "string" then support = e.support elseif s == "table" then support = faraway( e.support ) else scream = "INVALID" end if support then s = mw.text.trim( support ) if s == "" then scream = "EMPTY" elseif s:find( "[%[%]|%<%>]" ) then scream = "BAD PAGE" else support = s end end if scream then s = string.format( "params.%s.%s[%d].support %s", at, "suggestedvalues", i, scream ) Fault( s ) else swift = string.format( "[[:%s|%s]]", support, swift ) end end if all.type:sub( 1, 5 ) == "wiki-" and swift == e.code then local rooms = { file = 6, temp = 10, user = 2 } local ns = rooms[ all.type:sub( 6, 9 ) ] or 0 t = mw.title.makeTitle( ns, swift ) if t and t.exists then swift = string.format( "[[:%s|%s]]", t.prefixedText, swift ) end end if e.code == all.default then k = 800 else k = 300 end code = mw.html.create( "code" ) :css( "font-weight", tostring( k ) ) :css( "white-space", "nowrap" ) :wikitext( swift ) u:node( code ) end if e.class then s = type( e.class ) if s == "string" then u:addClass( e.class ) elseif s == "table" then for k, s in pairs( e.class ) do u:addClass( s ) end -- for k, s else s = string.format( "params.%s.%s[%d].class INVALID", at, "suggestedvalues", i ) Fault( s ) end end if e.css then if type( e.css ) == "table" then u:css( e.css ) else s = string.format( "params.%s.%s[%d].css INVALID", at, "suggestedvalues", i ) Fault( s ) end end if e.style then if type( e.style ) == "string" then u:cssText( e.style ) else s = string.format( "params.%s.%s[%d].style INVALID", at, "suggestedvalues", i ) Fault( s ) end end if all.type == "wiki-file-name" and not e.icon then e.icon = e.code end if e.label then s = type( e.label ) if s == "string" then s = mw.text.trim( e.label ) if s == "" then s = string.format( "params.%s.%s[%d].label %s", at, "suggestedvalues", i, "EMPTY" ) Fault( s ) else story = s end elseif s == "table" then story = faraway( e.label ) else s = string.format( "params.%s.%s[%d].label INVALID", at, "suggestedvalues", i ) Fault( s ) end end s = false if type( e.icon ) == "string" then t = mw.title.makeTitle( 6, e.icon ) if t and t.file.exists then local g = mw.html.create( "span" ) s = string.format( "[[%s|16px]]", t.prefixedText ) g:attr( "role", "presentation" ) :wikitext( s ) s = tostring( g ) end end if not s and not less and e.label then s = mw.ustring.char( 0x2013 ) end if s then d = mw.html.create( "span" ) :wikitext( s ) if TemplateData.ltr then if not less then d:css( "margin-left", "0.5em" ) end if story then d:css( "margin-right", "0.5em" ) end else if not less then d:css( "margin-right", "0.5em" ) end if story then d:css( "margin-left", "0.5em" ) end end u:node( d ) end if story then u:wikitext( story ) end r1:newline() :node( u ) end -- for i end if not r1 and v ~= false then Fault( string.format( "params.%s.suggestedvalues INVALID", at ) ) r1 = mw.html.create( "code" ) :addClass( "error" ) :wikitext( "INVALID" ) end return r1, r2 end -- feasible() local function feat() -- Check and store parameter sequence if Data.source then local i = 0 local s for k, v in pairs( Data.tree.params ) do if i == 0 then Data.order = { } i = 1 s = k else i = 2 break -- for k, v end end -- for k, v if i > 1 then local pointers = { } local points = { } local given = { } for k, v in pairs( Data.tree.params ) do i = facet( k, 1 ) if type( v ) == "table" then if type( v.label ) == "string" then s = mw.text.trim( v.label ) if s == "" then s = k end else s = k end if given[ s ] then if given[ s ] == 1 then local scream = "Parameter label '%s' detected multiple times" Fault( string.format( scream, s ) ) given[ s ] = 2 end else given[ s ] = 1 end end if i then table.insert( points, i ) pointers[ i ] = k i = facet( k, i ) if i then s = "Parameter '%s' detected twice" Fault( string.format( s, k ) ) end else s = "Parameter '%s' not detected" Fault( string.format( s, k ) ) end end -- for k, v table.sort( points ) for i = 1, #points do table.insert( Data.order, pointers[ points[ i ] ] ) end -- i = 1, #points elseif s then table.insert( Data.order, s ) end end end -- feat() local function feature( access ) -- Create table row for parameter, check and display violations -- Parameter: -- access -- string, with name -- Returns <tr> local mode, s, status local fine = function ( a ) s = mw.text.trim( a ) return a == s and a ~= "" and not a:find( "%|=\n" ) and not a:find( "%s%s" ) end local begin = mw.html.create( "td" ) local code = mw.html.create( "code" ) local desc = mw.html.create( "td" ) local eager = mw.html.create( "td" ) local legal = true local param = Data.tree.params[ access ] local ranking = { "required", "suggested", "optional", "deprecated" } local r = mw.html.create( "tr" ) local styles = "mw-templatedata-doc-param-" local sort, typed for k, v in pairs( param ) do if v == "" then param[ k ] = false end end -- for k, v -- label sort = param.label or access if sort:match( "^%d+$" ) then begin:attr( "data-sort-value", string.format( "%05d", tonumber( sort ) ) ) end begin:css( "font-weight", "bold" ) :wikitext( sort ) -- name and aliases code:css( "font-size", "92%" ) :css( "white-space", "nowrap" ) :wikitext( access ) if not fine( access ) then code:addClass( "error" ) Fault( string.format( "Bad ID params.<code>%s</code>", access ) ) legal = false begin:attr( "data-sort-value", " " .. sort ) end code = mw.html.create( "td" ) :addClass( styles .. "name" ) :node( code ) if access:match( "^%d+$" ) then code:attr( "data-sort-value", string.format( "%05d", tonumber( access ) ) ) end if type( param.aliases ) == "table" then local lapsus, syn for k, v in pairs( param.aliases ) do code:tag( "br" ) if type( v ) == "string" then if not fine( v ) then lapsus = true code:node( mw.html.create( "span" ) :addClass( "error" ) :css( "font-style", "italic" ) :wikitext( "string" ) ) :wikitext( s ) else syn = mw.html.create( "span" ) :addClass( styles .. "alias" ) :css( "white-space", "nowrap" ) :wikitext( s ) code:node( syn ) end else lapsus = true code:node( mw.html.create( "code" ) :addClass( "error" ) :wikitext( type( v ) ) ) end end -- for k, v if lapsus then s = string.format( "params.<code>%s</code>.aliases", access ) Fault( factory( "invalid-value" ):gsub( "$1", s ) ) legal = false end end -- description etc. s = fashioned( param ) if s then desc:node( s ) end if param.style then s = type( param.style ) if s == "table" then desc:css( param.style ) elseif s == "string" then desc:cssText( param.style ) end end if param.suggestedvalues or param.default or param.example or param.autovalue then local details = { "suggestedvalues", "default", "example", "autovalue" } local dl = mw.html.create( "dl" ) local dd, section, show for i = 1, #details do s = details[ i ] show = param[ s ] if show then dd = mw.html.create( "dd" ) section = factory( "doc-param-" .. s ) if param.type == "boolean" and ( show == "0" or show == "1" ) then local boole = Permit.boole[ ( show == "1" ) ] if boole.lead == true then dd:node( mw.html.create( "code" ) :wikitext( show ) ) :wikitext( " " ) end if type( boole.show ) == "string" then local v = mw.html.create( "span" ) :attr( "aria-hidden", "true" ) :wikitext( boole.show ) if boole.css then v:css( boole.css ) end dd:node( v ) end if type( boole.suffix ) == "string" then dd:wikitext( boole.suffix ) end if boole.lead == false then dd:wikitext( " " ) :node( mw.html.create( "code" ) :wikitext( show ) ) end elseif s == "suggestedvalues" then local v, css, class, ts = facilities( param ) if v then local ul ul, v = feasible( param, access, v ) if v then dd:newline() :node( ul ) if css then dd:css( css ) if class then dd:addClass( class ) end if ts then dd:newline() dd:node( ts ) end end Data.params[ access ].suggestedvalues = v end end else dd:wikitext( show ) end dl:node( mw.html.create( "dt" ) :wikitext( section ) ) :node( dd ) end end -- i = 1, #details desc:node( dl ) end -- type if type( param.type ) == "string" then param.type = mw.text.trim( param.type ) if param.type == "" then param.type = false end end if param.type then s = Permit.types[ param.type ] typed = mw.html.create( "td" ) :addClass( styles .. "type" ) if s then if s == "string" then Data.params[ access ].type = s typed:wikitext( factory( "doc-param-type-" .. s ) ) :tag( "br" ) typed:node( mw.html.create( "span" ) :addClass( "error" ) :wikitext( param.type ) ) Data.lasting = true else local support = Config[ "support4" .. param.type ] s = factory( "doc-param-type-" .. param.type ) if support then s = string.format( "[[%s|%s]]", support, s ) end typed:wikitext( s ) end else Data.params[ access ].type = "unknown" typed:addClass( "error" ) :wikitext( "INVALID" ) s = string.format( "params.<code>%s</code>.type", access ) Fault( factory( "invalid-value" ):gsub( "$1", s ) ) legal = false end else typed = mw.html.create( "td" ) :wikitext( factory( "doc-param-type-unknown" ) ) Data.params[ access ].type = "unknown" if param.default then Data.params[ access ].default = nil Fault( "Default value requires <code>type</code>" ) legal = false end end typed:addClass( "navigation-not-searchable" ) -- status if param.required then mode = 1 if param.autovalue then Fault( string.format( "autovalued <code>%s</code> required", access ) ) legal = false end if param.default then Fault( string.format( "Defaulted <code>%s</code> required", access ) ) legal = false end if param.deprecated then Fault( string.format( "Required deprecated <code>%s</code>", access ) ) legal = false end elseif param.deprecated then mode = 4 elseif param.suggested then mode = 2 else mode = 3 end status = ranking[ mode ] ranking = factory( "doc-param-status-" .. status ) if mode == 1 or mode == 4 then ranking = mw.html.create( "span" ) :css( "font-weight", "bold" ) :wikitext( ranking ) if type( param.deprecated ) == "string" then ranking:tag( "br" ) ranking:wikitext( param.deprecated ) end if param.suggested and mode == 4 then s = string.format( "Suggesting deprecated <code>%s</code>", access ) Fault( s ) legal = false end end eager:attr( "data-sort-value", tostring( mode ) ) :node( ranking ) :addClass( string.format( "%sstatus-%s %s", styles, status, "navigation-not-searchable" ) ) -- <tr> r:attr( "id", "templatedata:" .. mw.uri.anchorEncode( access ) ) :css( Permit.css[ status ] ) :addClass( styles .. status ) :node( begin ) :node( code ) :node( desc ) :node( typed ) :node( eager ) :newline() if not legal then r:css( "border", "#FF0000 3px solid" ) end return r end -- feature() local function features() -- Create <table> for parameters -- Returns <table>, or nil local r if Data.tree and Data.tree.params then local tbl = mw.html.create( "table" ) local tr = mw.html.create( "tr" ) feat() if Data.order and #Data.order > 1 then tbl:addClass( "sortable" ) end if type( Config.classTable ) == "table" then for k, v in pairs( Config.classTable ) do tbl:addClass( v ) end -- for k, v end if type( Config.cssTable ) == "table" then tbl:css( Config.cssTable ) end tr:addClass( "navigation-not-searchable" ) :node( mw.html.create( "th" ) :attr( "colspan", "2" ) :css( Permit.css.tablehead ) :wikitext( factory( "doc-param-name" ) ) ) :node( mw.html.create( "th" ) :css( Permit.css.tablehead ) :wikitext( factory( "doc-param-desc" ) ) ) :node( mw.html.create( "th" ) :css( Permit.css.tablehead ) :wikitext( factory( "doc-param-type" ) ) ) :node( mw.html.create( "th" ) :css( Permit.css.tablehead ) :wikitext( factory( "doc-param-status" ) ) ) tbl:newline() -- :node( mw.html.create( "thead" ) :node( tr ) -- ) :newline() if Data.order then local leave, s for i = 1, #Data.order do s = Data.order[ i ] if s:sub( 1, 1 ) == "=" then leave = true tbl:node( fatten( s ) ) Data.order[ i ] = false elseif s:match( "[=|]" ) then Fault( string.format( "Bad param <code>%s</code>", s ) ) else tbl:node( feature( s ) ) end end -- for i = 1, #Data.order if leave then for i = #Data.order, 1, -1 do if not Data.order[ i ] then table.remove( Data.order, i ) end end -- for i = #Data.order, 1, -1 end Data.tag.paramOrder = Data.order end if Config.cssTabWrap or Data.scroll then r = mw.html.create( "div" ) if type( Config.cssTabWrap ) == "table" then r:css( Config.cssTabWrap ) elseif type( Config.cssTabWrap ) == "string" then -- deprecated r:cssText( Config.cssTabWrap ) end if Data.scroll then r:css( "height", Data.scroll ) :css( "overflow", "auto" ) end r:node( tbl ) else r = tbl end end return r end -- features() local function fellow( any, assigned, at ) -- Check sets[] parameter and issue error message, if necessary -- Parameter: -- any -- should be number -- assigned -- parameter name -- at -- number, of set local s if type( any ) ~= "number" then s = "<code>sets[%d].params[%s]</code>??" Fault( string.format( s, at, mw.text.nowiki( tostring( any ) ) ) ) elseif type( assigned ) == "string" then if not Data.got.params[ assigned ] then s = "<code>sets[%d].params %s</code> is undefined" Fault( string.format( s, at, assigned ) ) end else s = "<code>sets[%d].params[%d] = %s</code>??" Fault( string.format( s, k, type( assigned ) ) ) end end -- fellow() local function fellows() -- Check sets[] and issue error message, if necessary local s if type( Data.got.sets ) == "table" then if type( Data.got.params ) == "table" then for k, v in pairs( Data.got.sets ) do if type( k ) == "number" then if type( v ) == "table" then for ek, ev in pairs( v ) do if ek == "label" then s = type( ev ) if s ~= "string" and s ~= "table" then s = "<code>sets[%d].label</code>??" Fault( string.format( s, k ) ) end elseif ek == "params" and type( ev ) == "table" then for pk, pv in pairs( ev ) do fellow( pk, pv, k ) end -- for pk, pv else ek = mw.text.nowiki( tostring( ek ) ) s = "<code>sets[%d][%s]</code>??" Fault( string.format( s, k, ek ) ) end end -- for ek, ev else k = mw.text.nowiki( tostring( k ) ) v = mw.text.nowiki( tostring( v ) ) s = string.format( "<code>sets[%s][%s]</code>??", k, v ) Fault( s ) end else k = mw.text.nowiki( tostring( k ) ) s = string.format( "<code>sets[%s]</code> ?????", k ) Fault( s ) end end -- for k, v else s = "<code>params</code> required for <code>sets</code>" Fault( s ) end else s = "<code>sets</code> needs to be of <code>object</code> type" Fault( s ) end end -- fellows() local function finalize( advance ) -- Wrap presentation into frame -- Parameter: -- advance -- true, for nice -- Returns string local r, lapsus if Data.div then r = tostring( Data.div ) elseif Data.strip then r = Data.strip else lapsus = true r = "" end r = r .. failures() if Data.source then local live = ( advance or lapsus ) if not live then live = TemplateData.frame:preprocess( "{{REVISIONID}}" ) live = ( live == "" ) end if live then r = r .. fancy( advance, lapsus ) end end return r end -- finalize() local function find() -- Find JSON data within page source (title) -- Returns string, or nil local s = Data.title:getContent() local i, j = s:find( "<templatedata>", 1, true ) local r if i then local k = s:find( "</templatedata>", j, true ) if k then r = mw.text.trim( s:sub( j + 1, k - 1 ) ) end end return r end -- find() local function flat( adjust ) -- Remove formatting from text string for VE -- Parameter: -- arglist -- string, to be stripped, or nil -- Returns string, or nil local r if adjust then r = adjust:gsub( "\n", " " ) if r:find( "<noexport>", 1, true ) then r = r:gsub( "<noexport>.*</noexport>", "" ) end if r:find( "<exportonly>", 1, true ) then r = r:gsub( "</?exportonly>", "" ) end if r:find( "''", 1, true ) then r = r:gsub( "'''", "" ):gsub( "''", "" ) end if r:find( "<", 1, true ) then local Text = Fetch( "Text" ) r = Text.getPlain( r:gsub( "<br */?>", "\r\n" ) ) end if r:find( "[", 1, true ) then local WLink = Fetch( "WLink" ) if WLink.isBracketedURL( r ) then r = r:gsub( "%[([hf]tt?ps?://%S+) [^%]]+%]", "%1" ) end r = WLink.getPlain( r ) end if r:find( "&", 1, true ) then r = mw.text.decode( r ) if r:find( "&shy;", 1, true ) then r = r:gsub( "&shy;", "" ) end end end return r end -- flat() local function flush() -- JSON encode narrowed input; obey unnamed (numerical) parameters -- Returns <templatedata> JSON string local r if Data.tag then r = mw.text.jsonEncode( Data.tag ):gsub( "%}$", "," ) else r = "{" end r = r .. "\n\"params\":{" if Data.order then local sep = "" local s for i = 1, #Data.order do s = Data.order[ i ] r = string.format( "%s%s\n%s:%s", r, sep, mw.text.jsonEncode( s ), mw.text.jsonEncode( Data.params[ s ] ) ) sep = ",\n" end -- for i = 1, #Data.order end r = r .. "\n}\n}" return r end -- flush() local function focus( access ) -- Check components; focus multilingual description, build trees -- Parameter: -- access -- string, name of parameter, nil for root local f = function ( a, at ) local r if at then r = string.format( "<code>params.%s</code>", at ) else r = "''root''" end if a then r = string.format( "%s<code>.%s</code>", r, a ) end return r end local parent if access then parent = Data.got.params[ access ] else parent = Data.got end if type( parent ) == "table" then local elem, got, permit, s, scope, slot, tag, target if access then permit = Permit.params if type( access ) == "number" then slot = tostring( access ) else slot = access end else permit = Permit.root end for k, v in pairs( parent ) do scope = permit[ k ] if scope then s = type( v ) if s == "string" and k ~= "format" then v = mw.text.trim( v ) end if scope:find( s, 1, true ) then if scope:find( "I18N", 1, true ) then if s == "string" then elem = fair( v ) elseif s == "table" then local translated v, translated = faraway( v ) if v then if translated and k == "description" then elem = { [ 1 ] = fair( v ), [ 2 ] = translated } else elem = fair( v ) end else elem = false end end if type( v ) == "string" then if k == "deprecated" then if v == "1" then v = true elseif v == "0" then v = false end elem = v elseif scope:find( "nowiki", 1, true ) then elem = mw.text.nowiki( v ) elem = elem:gsub( "&#13;\n", "<br>" ) v = v:gsub( string.char( 13 ), "" ) else v = flat( v ) end elseif s == "boolean" then if scope:find( "boolean", 1, true ) then elem = v else s = "Type <code>boolean</code> bad for " .. f( k, slot ) Fault( s ) end end else if k == "params" and not access then v = nil elem = nil elseif k == "format" and not access then elem = mw.text.decode( v ) v = nil elseif k == "inherits" then elem = v if not Data.heirs then Data.heirs = { } end Data.heirs[ slot ] = v v = nil elseif k == "style" then elem = v v = nil elseif s == "string" then v = mw.text.nowiki( v ) elem = v else elem = v end end if type( elem ) ~= "nil" then if not target then if access then if not Data.tree.params then Data.tree.params = { } end Data.tree.params[ slot ] = { } target = Data.tree.params[ slot ] else Data.tree = { } target = Data.tree end end target[ k ] = elem elem = false end if type( v ) ~= "nil" then if not tag then if access then if type( v ) == "string" and v.sub( 1, 1 ) == "=" then v = nil else if not Data.params then Data.params = { } end Data.params[ slot ] = { } tag = Data.params[ slot ] end else Data.tag = { } tag = Data.tag end end if type( v ) ~= "nil" and k ~= "suggestedvalues" then tag[ k ] = v end end else s = string.format( "Type <code>%s</code> bad for %s", scope, f( k, slot ) ) Fault( s ) end else Fault( "Unknown component " .. f( k, slot ) ) end end -- for k, v if not access and Data.got.sets then fellows() end else Fault( f() .. " needs to be of <code>object</code> type" ) end end -- focus() local function format() -- Build formatted element -- Returns <inline> local source = Data.tree.format:lower() local r, s if source == "inline" or source == "block" then r = mw.html.create( "i" ) :wikitext( source ) else local code if source:find( "|", 1, true ) then local scan = "^[\n ]*%{%{[\n _]*|[\n _]*=[\n _]*%}%}[\n ]*$" if source:match( scan ) then code = source:gsub( "\n", "N" ) else s = mw.text.nowiki( source ):gsub( "\n", "&#92;n" ) s = tostring( mw.html.create( "code" ) :wikitext( s ) ) Fault( "Invalid format " .. s ) source = false end else local words = mw.text.split( source, "%s+" ) local show, start, support, unknown for i = 1, #words do s = words[ i ] if i == 1 then start = s end support = Permit.builder[ s ] if support == start or support == "*" then Permit.builder[ s ] = true elseif s:match( "^[1-9]%d?" ) and Permit.builder.align then Permit.builder.align = tonumber( s ) else if unknown then unknown = string.format( "%s %s", unknown, s ) else unknown = s end end end -- i = 1, #words if unknown then s = tostring( mw.html.create( "code" ) :css( "white-space", "nowrap" ) :wikitext( s ) ) Fault( "Unknown/misplaced format keyword " .. s ) source = false start = false end if start == "inline" then if Permit.builder.half == true then show = "inline half" code = "{{_ |_=_}}" elseif Permit.builder.grouped == true then show = "inline grouped" code = "{{_ | _=_}}" elseif Permit.builder.spaced == true then show = "inline spaced" code = "{{_ | _ = _ }}" end if Permit.builder.newlines == true then show = show or "inline" code = code or "{{_|_=_}}" show = show .. " newlines" code = string.format( "N%sN", code ) end elseif start == "block" then local space = "" -- amid "|" and name local spaced = " " -- preceding "=" local spacer = " " -- following "=" local suffix = "N" -- closing "}}" on new line show = "block" if Permit.builder.indent == true then start = " " show = "block indent" else start = "" end if Permit.builder.compressed == true then spaced = "" spacer = "" show = show .. " compressed" if Permit.builder.last == true then show = show .. " last" else suffix = "" end else if Permit.builder.lead == true then show = show .. " lead" space = " " end if type( Permit.builder.align ) ~= "string" then local n s = " align" if Permit.builder.align == true then n = 0 if type( Data.got ) == "table" and type( Data.got.params ) == "table" then for k, v in pairs( Data.got.params ) do if type( v ) == "table" and not v.deprecated and type( k ) == "string" then k = mw.ustring.len( k ) if k > n then n = k end end end -- for k, v end else n = Permit.builder.align if type( n ) == "number" and n > 1 then s = string.format( "%s %d", s, n ) else n = 0 -- How comes? end end if n > 1 then spaced = string.rep( "_", n - 1 ) .. " " end show = show .. s elseif Permit.builder.after == true then spaced = "" show = show .. " after" elseif Permit.builder.dense == true then spaced = "" spacer = "" show = show .. " dense" end if Permit.builder.last == true then suffix = spacer show = show .. " last" end end code = string.format( "N{{_N%s|%s_%s=%s_%s}}N", start, space, spaced, spacer, suffix ) if show == "block" then show = "block newlines" end end if show then r = mw.html.create( "span" ) :wikitext( show ) end end if code then source = code:gsub( "N", "\n" ) code = mw.text.nowiki( code ):gsub( "N", "&#92;n" ) code = mw.html.create( "code" ) :css( "margin-left", "1em" ) :css( "margin-right", "1em" ) :wikitext( code ) if r then r = mw.html.create( "span" ) :node( r ) :node( code ) else r = code end end end if source and Data.tag then Data.tag.format = source end return r end -- format() local function formatter() -- Build presented documentation -- Returns <div> local r = mw.html.create( "div" ) local x = fashioned( Data.tree, true, r ) local s if x then r = x end if Data.leading then local toc = mw.html.create( "div" ) local shift if Config.suppressTOCnum then toc:addClass( Config.suppressTOCnum ) if type( Config.stylesTOCnum ) == "string" then local src = Config.stylesTOCnum .. "/styles.css" s = TemplateData.frame:extensionTag( "templatestyles", nil, { src = src } ) r:newline() :node( s ) end end toc:addClass( "navigation-not-searchable" ) :css( "margin-top", "0.5em" ) :wikitext( "__TOC__" ) if Data.sibling then local block = mw.html.create( "div" ) if TemplateData.ltr then shift = "right" else shift = "left" end block:css( "float", shift ) :wikitext( Data.sibling ) r:newline() :node( block ) :newline() end r:newline() :node( toc ) :newline() if shift then r:node( mw.html.create( "div" ) :css( "clear", shift ) ) :newline() end end s = features() if s then if Data.leading then r:node( mw.html.create( "h" .. Config.nested ) :wikitext( factory( "doc-params" ) ) ) :newline() end r:node( s ) end if Data.shared then local global = mw.html.create( "div" ) :attr( "id", "templatedata-global" ) local shift if TemplateData.ltr then shift = "right" else shift = "left" end global:css( "float", shift ) :wikitext( string.format( "[[%s|%s]]", Data.shared, "Global" ) ) r:newline() :node( global ) end if Data.tree and Data.tree.format then local e = format() if e then local show = "Format" if Config.supportFormat then show = string.format( "[[%s|%s]]", Config.supportFormat, show ) end r:node( mw.html.create( "p" ) :addClass( "navigation-not-searchable" ) :wikitext( show .. ": " ) :node( e ) ) end end return r end -- formatter() local function free() -- Remove JSON comment lines if Data.source:find( "//", 1, true ) then Data.source:gsub( "([{,\"'])(%s*\n%s*//.*\n%s*)([{},\"'])", "%1%3" ) end end -- free() local function full() -- Build survey table from JSON data, append invisible <templatedata> Data.div = mw.html.create( "div" ) :addClass( "mw-templatedata-doc-wrap" ) if Permit.css.bg then Data.div:css( Permit.css.bg ) end if Permit.css.fg then Data.div:css( Permit.css.fg ) end focus() if Data.tag then if type( Data.got.params ) == "table" then for k, v in pairs( Data.got.params ) do focus( k ) end -- for k, v if Data.heirs then fathers() end end end Data.div:node( formatter() ) if not Data.lazy then Data.slim = flush() if TemplateData.frame then local div = mw.html.create( "div" ) local tdata = { [ 1 ] = "templatedata", [ 2 ] = Data.slim } Data.strip = TemplateData.frame:callParserFunction( "#tag", tdata ) div:wikitext( Data.strip ) if Config.loudly then Data.div:node( mw.html.create( "hr" ) :css( { height = "7ex" } ) ) else div:css( "display", "none" ) end Data.div:node( div ) end end if Data.lasting then Fault( "deprecated type syntax" ) end if Data.less then Fault( Config.solo ) end end -- full() local function furnish( adapt, arglist ) -- Analyze transclusion -- Parameter: -- adapt -- table, #invoke parameters -- arglist -- table, template parameters -- Returns string local source favorize() -- deprecated: for k, v in pairs( Config.basicCnf ) do if adapt[ k ] and adapt[ k ] ~= "" then Config[ v ] = adapt[ k ] end end -- for k, v if arglist.heading and arglist.heading:match( "^[3-6]$" ) then Config.nested = arglist.heading else Config.nested = "2" end Config.loudly = faculty( arglist.debug or adapt.debug ) Data.lazy = faculty( arglist.lazy ) and not Config.loudly Data.leading = faculty( arglist.TOC ) if Data.leading and arglist.TOCsibling then Data.sibling = mw.text.trim( arglist.TOCsibling ) end if arglist.lang then Data.slang = arglist.lang:lower() elseif adapt.lang then Data.slang = adapt.lang:lower() end if arglist.JSON then source = arglist.JSON elseif arglist.Global then source = TemplateData.getGlobalJSON( arglist.Global, arglist.Local ) elseif arglist[ 1 ] then local s = mw.text.trim( arglist[ 1 ] ) local start = s:sub( 1, 1 ) if start == "<" then Data.strip = s elseif start == "{" then source = s elseif mw.ustring.sub( s, 1, 8 ) == mw.ustring.char( 127, 39, 34, 96, 85, 78, 73, 81 ) then Data.strip = s end end if type( arglist.vertical ) == "string" and arglist.vertical:match( "^%d*%.?%d+[emprx]+$" ) then Data.scroll = arglist.vertical end if not source then Data.title = mw.title.getCurrentTitle() source = find() if not source and not Data.title.text:match( Config.subpage ) then local s = string.format( Config.suffix, Data.title.prefixedText ) Data.title = mw.title.new( s ) if Data.title.exists then source = find() end end end if not Data.lazy then if not Data.title then Data.title = mw.title.getCurrentTitle() end Data.lazy = Data.title.text:match( Config.subpage ) end if type( source ) == "string" then TemplateData.getPlainJSON( source ) end return finalize( faculty( arglist.source ) ) end -- furnish() Failsafe.failsafe = function ( atleast ) -- Retrieve versioning and check for compliance -- Precondition: -- atleast -- string, with required version -- or wikidata|item|~|@ or false -- Postcondition: -- Returns string -- with queried version/item, also if problem -- false -- if appropriate -- 2020-08-17 local since = atleast local last = ( since == "~" ) local linked = ( since == "@" ) local link = ( since == "item" ) local r if last or link or linked or since == "wikidata" then local item = Failsafe.item since = false if type( item ) == "number" and item > 0 then local suited = string.format( "Q%d", item ) if link then r = suited else local entity = mw.wikibase.getEntity( suited ) if type( entity ) == "table" then local seek = Failsafe.serialProperty or "P348" local vsn = entity:formatPropertyValues( seek ) if type( vsn ) == "table" and type( vsn.value ) == "string" and vsn.value ~= "" then if last and vsn.value == Failsafe.serial then r = false elseif linked then if mw.title.getCurrentTitle().prefixedText == mw.wikibase.getSitelink( suited ) then r = false else r = suited end else r = vsn.value end end end end end end if type( r ) == "nil" then if not since or since <= Failsafe.serial then r = Failsafe.serial else r = false end end return r end -- Failsafe.failsafe() TemplateData.getGlobalJSON = function ( access, adapt ) -- Retrieve TemplateData from a global repository (JSON) -- Parameter: -- access -- string, with page specifier (on WikiMedia Commons) -- adapt -- JSON string or table with local overrides -- Returns true, if succeeded local plugin = Fetch( "/global" ) local r if type( plugin ) == "table" and type( plugin.fetch ) == "function" then local s, got = plugin.fetch( access, adapt ) if got then Data.got = got Data.order = got.paramOrder Data.shared = s r = true full() else Fault( s ) end end return r end -- TemplateData.getGlobalJSON() TemplateData.getPlainJSON = function ( adapt ) -- Reduce enhanced JSON data to plain text localized JSON -- Parameter: -- adapt -- string, with enhanced JSON -- Returns string, or not if type( adapt ) == "string" then Data.source = adapt free() local lucky lucky, Data.got = pcall( mw.text.jsonDecode, Data.source ) if type( Data.got ) == "table" then full() elseif not Data.strip then local scream = type( Data.got ) if scream == "string" then scream = Data.got else scream = "Data.got: " .. scream end Fault( "fatal JSON error: " .. scream ) end end return Data.slim end -- TemplateData.getPlainJSON() TemplateData.test = function ( adapt, arglist ) TemplateData.frame = mw.getCurrentFrame() return furnish( adapt, arglist ) end -- TemplateData.test() -- Export local p = { } p.f = function ( frame ) -- Template call local lucky, r TemplateData.frame = frame lucky, r = pcall( furnish, frame.args, frame:getParent().args ) if not lucky then Fault( "INTERNAL: " .. r ) r = failures() end return r end -- p.f p.failsafe = function ( frame ) -- Versioning interface local s = type( frame ) local since if s == "table" then since = frame.args[ 1 ] elseif s == "string" then since = frame end if since then since = mw.text.trim( since ) if since == "" then since = false end end return Failsafe.failsafe( since ) or "" end -- p.failsafe p.TemplateData = function () -- Module interface return TemplateData end return p a0976bcf0e87d0e519ff239bd6aec0b63b6f40c6 Module:Transclusion count/data/P 828 224 560 559 2024-02-08T00:30:58Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Transclusion_count/data/P]] Scribunto text/plain return { ["P"] = 6200, ["P-phrases"] = 3400, ["P."] = 3700, ["P1"] = 148000, ["P2"] = 303000, ["PAGENAMEBASE"] = 1590000, ["PAGENAMEU"] = 66000, ["PAK"] = 3000, ["PD-US"] = 10000, ["PD-US-1923"] = 2200, ["PD-US-1923-abroad"] = 5600, ["PD-US-expired"] = 4500, ["PD-US-expired-abroad"] = 7100, ["PD-art"] = 3300, ["PD-ineligible-USonly"] = 5500, ["PD-notice"] = 22000, ["PD-old-100"] = 3700, ["PD-self"] = 34000, ["PD-textlogo"] = 6200, ["PDB_Gallery"] = 2900, ["PDanube"] = 3200, ["PER"] = 3200, ["PHI"] = 2600, ["PHL"] = 3600, ["PLANTS"] = 4000, ["PM20"] = 3300, ["PMID"] = 7100, ["POL"] = 65000, ["POR"] = 5000, ["POTD_default"] = 11000, ["POTD_image"] = 2800, ["POTD_navigation"] = 6900, ["POTDlink"] = 7400, ["POV"] = 7300, ["PR/header"] = 3100, ["PR/heading"] = 7200, ["PRT"] = 5800, ["PR_link"] = 103000, ["PS"] = 2900, ["Pad"] = 56000, ["Page"] = 4100, ["Page_name_sub"] = 46000, ["Page_needed"] = 19000, ["Page_tabs"] = 3600, ["Page_tabs/styles.css"] = 3600, ["Page_views"] = 2500, ["Pagelinks"] = 43000, ["Pagelist"] = 4600, ["Pagetype"] = 12200000, ["Paid"] = 9800, ["Para"] = 2330000, ["Parabr"] = 2900, ["Paragraph_break"] = 1250000, ["Param_value"] = 137000, ["Parameter_names_example"] = 2400, ["ParmPart"] = 13000, ["Partial"] = 2500, ["Partial_minor_planet_designation"] = 5700, ["Partly_done"] = 2800, ["Party_color"] = 76000, ["Party_color_cell"] = 4500, ["Party_name_with_color"] = 8100, ["Party_name_with_colour"] = 3300, ["Party_shading/Democratic"] = 15000, ["Party_shading/Independent"] = 2400, ["Party_shading/Republican"] = 15000, ["Party_stripe"] = 19000, ["Pass"] = 2700, ["Pb"] = 1230000, ["Pbox"] = 3100, ["Pbox/1"] = 3100, ["Peacock"] = 3300, ["Pedigree"] = 3900, ["Peer_review/heading"] = 10000, ["Peer_review_tools"] = 8400, ["Penalty_shoot-out"] = 4000, ["Pending"] = 4100, ["Pending_DYK_biographies"] = 2800, ["Pengoal"] = 9800, ["Penmiss"] = 11000, ["Percentage"] = 13000, ["Performance_key"] = 2500, ["Period_color"] = 24000, ["Period_end"] = 22000, ["Period_id"] = 24000, ["Period_start"] = 24000, ["PeruTasks"] = 16000, ["Phab"] = 6200, ["Phanerozoic_220px"] = 21000, ["PharmNavFootnote"] = 5300, ["Philippine_name"] = 2900, ["Philosophy"] = 2200, ["Photo_montage"] = 4700, ["Photo_requested"] = 104000, ["Photograph_requested"] = 3300, ["Photomontage"] = 4600, ["Physics"] = 3400, ["Picture_of_the_day"] = 7400, ["Pie_chart"] = 6100, ["Pie_chart/slice"] = 6100, ["Ping"] = 236000, ["Pipe"] = 106000, ["Place_name_disambiguation"] = 39000, ["Plain_link"] = 161000, ["Plain_list"] = 14000, ["Plain_text"] = 80000, ["Plainlink"] = 82000, ["Plainlist"] = 360000, ["Plainlist/styles.css"] = 2990000, ["Player"] = 3600, ["Player2"] = 2500, ["Please_check_ISSN"] = 15000, ["Plural"] = 106000, ["Pluralize_from_text"] = 1420000, ["Poem_quote"] = 3100, ["Poemquote"] = 2400, ["Politician_icon"] = 34000, ["Politician_icon2"] = 34000, ["Politics_sidebar_below"] = 19000, ["Politics_sidebar_title"] = 19000, ["Poll_top"] = 2000, ["Polluted_category"] = 2200, ["Polparty"] = 27000, ["Pop_density"] = 9100, ["Population_Germany"] = 14000, ["Portal"] = 9430000, ["Portal-Class"] = 7700, ["Portal-inline"] = 226000, ["Portal_bar"] = 115000, ["Portal_box"] = 2700, ["Portalbar"] = 12000, ["Portuguese_name"] = 8900, ["PosMapFS"] = 4300, ["Possible"] = 3500, ["Possibly_empty_category"] = 68000, ["Post-nominals"] = 53000, ["Post-nominals/AUS"] = 7700, ["Post-nominals/CAN"] = 9300, ["Post-nominals/GBR"] = 27000, ["Post-nominals/NZL"] = 4000, ["Postnominals"] = 9500, ["Pp"] = 15000, ["Pp-book-cover"] = 52000, ["Pp-extended"] = 2600, ["Pp-move"] = 8700, ["Pp-move-indef"] = 3000, ["Pp-pc"] = 3600, ["Pp-pc1"] = 2100, ["Pp-protected"] = 6900, ["Pp-semi-indef"] = 4500, ["Pp-template"] = 2700, ["Pp-vandalism"] = 2600, ["Precision"] = 274000, ["PresFoot"] = 2900, ["PresHead"] = 3300, ["PresRow"] = 3300, ["Press"] = 4800, ["Preview_warning"] = 33000, ["Primary_source_inline"] = 6000, ["Primary_sources"] = 31000, ["Principal_rank"] = 503000, ["Prl"] = 103000, ["Pro-wrestling"] = 3000, ["ProCyclingStats"] = 2400, ["ProQuest"] = 18000, ["Professional_wrestling_profiles"] = 2100, ["Professional_wrestling_results_table"] = 2600, ["Profit"] = 3800, ["Progress_box"] = 17000, ["Project-Class"] = 12000, ["Project_other"] = 16000, ["Proper_name"] = 2400, ["Prose"] = 3400, ["Proxy_block"] = 2200, ["Pso"] = 3300, ["Purge"] = 393000, ["Purge_button"] = 17000, ["Module:Page"] = 107000, ["Module:PageLinks"] = 43000, ["Module:Page_tabs"] = 3600, ["Module:Pagelist"] = 4600, ["Module:Pagetype"] = 16200000, ["Module:Pagetype/config"] = 16200000, ["Module:Pagetype/disambiguation"] = 3830000, ["Module:Pagetype/setindex"] = 3890000, ["Module:Pagetype/softredirect"] = 4380000, ["Module:ParameterCount"] = 902000, ["Module:Parameter_names_example"] = 2400, ["Module:Parameter_validation"] = 135000, ["Module:Parameter_validation/default_config"] = 135000, ["Module:Party_name_with_color"] = 8900, ["Module:Percentage"] = 13000, ["Module:Person_height"] = 262000, ["Module:Person_length"] = 7100, ["Module:Person_weight"] = 79000, ["Module:Photo_montage"] = 4700, ["Module:Plain_text"] = 1560000, ["Module:Political_party"] = 118000, ["Module:Political_party/A"] = 20000, ["Module:Political_party/B"] = 16000, ["Module:Political_party/C"] = 40000, ["Module:Political_party/D"] = 49000, ["Module:Political_party/E"] = 5600, ["Module:Political_party/F"] = 12000, ["Module:Political_party/G"] = 17000, ["Module:Political_party/H"] = 5300, ["Module:Political_party/I"] = 49000, ["Module:Political_party/J"] = 7400, ["Module:Political_party/K"] = 3800, ["Module:Political_party/L"] = 38000, ["Module:Political_party/M"] = 12000, ["Module:Political_party/N"] = 30000, ["Module:Political_party/O"] = 5200, ["Module:Political_party/P"] = 26000, ["Module:Political_party/R"] = 47000, ["Module:Political_party/S"] = 29000, ["Module:Political_party/T"] = 11000, ["Module:Political_party/U"] = 18000, ["Module:Political_party/V"] = 7400, ["Module:Political_party/W"] = 11000, ["Module:Pop_density"] = 9100, ["Module:PopulationFromWikidata"] = 6500, ["Module:Portal"] = 9760000, ["Module:Portal-inline"] = 227000, ["Module:Portal/images/a"] = 1650000, ["Module:Portal/images/aliases"] = 229000, ["Module:Portal/images/b"] = 2800000, ["Module:Portal/images/c"] = 1610000, ["Module:Portal/images/d"] = 103000, ["Module:Portal/images/e"] = 411000, ["Module:Portal/images/f"] = 814000, ["Module:Portal/images/g"] = 627000, ["Module:Portal/images/h"] = 429000, ["Module:Portal/images/i"] = 1080000, ["Module:Portal/images/j"] = 269000, ["Module:Portal/images/k"] = 72000, ["Module:Portal/images/l"] = 418000, ["Module:Portal/images/m"] = 629000, ["Module:Portal/images/n"] = 717000, ["Module:Portal/images/o"] = 404000, ["Module:Portal/images/other"] = 127000, ["Module:Portal/images/p"] = 857000, ["Module:Portal/images/q"] = 3100, ["Module:Portal/images/r"] = 371000, ["Module:Portal/images/s"] = 1580000, ["Module:Portal/images/t"] = 640000, ["Module:Portal/images/u"] = 1010000, ["Module:Portal/images/v"] = 286000, ["Module:Portal/images/w"] = 171000, ["Module:Portal/images/y"] = 33000, ["Module:Portal/images/z"] = 5500, ["Module:Portal/styles.css"] = 9430000, ["Module:Portal_bar"] = 135000, ["Module:Portal_bar/styles.css"] = 134000, ["Module:Professional_wrestling_profiles"] = 2200, ["Module:Professional_wrestling_results_table"] = 2600, ["Module:Progress_box"] = 17000, ["Module:Progress_box/config"] = 17000, ["Module:Progress_box/styles.css"] = 17000, ["Module:Protect"] = 110000, ["Module:Protected_edit_request"] = 48000, ["Module:Protection_banner"] = 56000, ["Module:Protection_banner/config"] = 56000, ["Module:Purge"] = 412000, } 49d6d65e8c371b076fef239e9164011804ccd70f Template:Cascade-protected template 10 225 562 561 2024-02-08T00:30:59Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Cascade-protected_template]] wikitext text/x-wiki {{mbox | type = protection | textstyle = font-weight:bold; font-size:130%; | image = [[File:Cascade-protection-shackle.svg|40x40px|link=|alt=]] | text = <div style="text-align: center;">This {{{page|template}}} is [[Wikipedia:Transclusion|transcluded]] in one or more [[Wikipedia:Protection policy#Cascading protection|cascade-protected]] pages, so only [[Wikipedia:Administrators|administrators]] can edit it.</div> }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> 364e1b949a303bad9181218b6a19d3f3b9e0626d Template:Bold list 10 226 564 563 2024-02-08T00:30:59Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Bold_list]] wikitext text/x-wiki <includeonly>{{{{{|safesubst:}}}#invoke:Bold list|main|conj={{{conj|or}}}}}</includeonly><noinclude>{{{{BASEPAGENAME}}|A|B|C}} {{Documentation}}</noinclude> 2a2ac83abf84eb3db2c1d0b15b6c66cf88f18e99 Template:HTML lists 10 227 566 565 2024-02-08T00:31:00Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:HTML_lists]] wikitext text/x-wiki {{navbox top |name= HTML lists |title=HTML lists |state=<includeonly>collapsed</includeonly> |above = More information: {{hlist | [[Help:List]] | [[WP:List dos and don'ts]] | [[WP:Manual of Style/Embedded lists]] | {{section link|WP:Manual of Style/Accessibility#Lists}} | [[WP:WikiProject Lists]] }} }} {|style="width:100%" | style="vertical-align:top; width:32%" | {| class="wikitable" style="width:100%" |- ! Horizontal list |- | {{mono|{{tl|hlist}}}} |- | {{tlx|hlist |item1&nbsp;|item2&nbsp;|...}} |- | {{hlist |item1 |item2 |...}} |} | rowspan=4 style="width:2%"| | style="vertical-align:top; width:32%"| {| class="wikitable" style="width:100%" |- ! Horizontal list |- | {{mono|{{tl|flatlist}}}} |- | {{tlx|flatlist|<br />* item1<br />* item2<br />* ...}} |- | {{flatlist| * item1 * item2 * ... }} |} | rowspan=4 style="width:2%" | | style="vertical-align:top; width:32%"| {| class="wikitable" style="width:100%" |- ! Horizontal list |- | {{mono|{{tl|cslist}}}} |- | {{tlx|cslist |item1&nbsp;|item2&nbsp;|...}} |- | {{cslist |item1 |item2 |...}} |- !style="font-weight: normal; text-align:center;" | {{mono|{{tl|bold list}}}} |- | {{tlx|bold list |item1&nbsp;|item2&nbsp;|...}} |- | {{bold list |item1 |item2 |...}} |} |- | style="vertical-align:top;"| {| class="wikitable" style="width:100%" |- ! Bulleted list |- | {{mono|{{tl|bulleted list}}}} |- | {{tlx|bulleted list |item1&nbsp;|item2&nbsp;|...}} |- | {{bulleted list |item1 |item2 |...}} |} | style="vertical-align:top;"| {| class="wikitable" style="width:100%" |- ! Numeric ordered list |- | {{mono|{{tl|ordered list}}}} |- | {{tlx|Ordered list |first&nbsp;|second&nbsp;|...}} |- | {{Ordered list |first |second |...}} |} | style="vertical-align:top;"| {| class="wikitable" style="width:100%" |- ! Alphabetic ordered list |- | {{mono|{{tl|ordered list}}}} |- | {{tlx|Ordered list |list_style_type{{=}}lower-alpha&nbsp;|first&nbsp;|second&nbsp;|...}} |- | {{Ordered list |list_style_type=lower-alpha |first |second |...}} |} |- | style="vertical-align:top"| {| class="wikitable" style="width:100%" |- ! Unbulleted list |- | {{mono|{{tl|unbulleted list}}}} |- | {{tlx|unbulleted list |item1&nbsp;|item2&nbsp;|...}} |- | {{unbulleted list|item1|item2|...}} |} | style="vertical-align:top"| {| class="wikitable" style="width:100%" |- ! Unbulleted list |- | {{mono|{{tl|plainlist}}}} |- | {{tlx|plainlist|<br />* item1<br />* item2<br />* ...}} |- | {{plainlist| * item1 * item2 * ... }} |} | style="vertical-align:top" rowspan=2| {| class="wikitable" style="width:100%" |- ! Glossary or definition list |- | {{mono|{{tl|glossary}}}}<br />([[Wikipedia:Manual of Style/Glossaries|glossary]], description, definition, association) |- | {{tlx|glossary}}<br /> {{tlx|term|first term}}{{tlx|defn|first description}}<br /> {{tnull|term|second term}}{{tnull|defn|second description}}<br /> {{tnull|term|...}}{{tnull|defn|....}}<br /> {{mono|{{tl|glossary end}}}} |- | {{glossary}} {{term|first term}}{{defn|first description}} {{term|second term}}{{defn|second description}} {{term|...}}{{defn|....}} {{glossary end}} |} |- | style="vertical-align:top"| {| class="wikitable" style="width:100%" |- ! Bulleted list to flow around an image |- | {{mono|{{tl|flowlist}}}} |- | <code><nowiki>[[File:Bad Title Example.png|left|thumb|100px]]</nowiki></code><br /> {{tlx|flowlist|<br />*item1<br />*item2<br />*...}} |- | [[File:Bad Title Example.png|left|thumb|100px]] {{flowlist| *item1 *item2 *... }} |} | style="vertical-align:top"| {| class="wikitable" style="width:100%" |- ! Ordered list in columns |- | {{mono|{{tl|columns-list}}}} |- | {{tlx|columns-list|colwidth{{=}}5em|<br /># first<br /># second<br /># third<br /># ...}} |- | {{columns-list|colwidth=5em| # first # second # third # ... }} |} | style="vertical-align:top"| |} {{navbox bottom |below = {{cl|List formatting and function templates‎}} }}<noinclude> {{documentation}} <!-- Please add categories to the /doc subpage; interwikis go to Wikidata --> </noinclude> bc8771283bcdc7d736cca9716beebac6300dd812 Template:Nowiki2 10 228 568 567 2024-02-08T00:31:01Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Nowiki2]] wikitext text/x-wiki {{#if: {{{tag|}}} | {{#if: {{{style|}}} | <{{{tag}}} style="{{{style}}}"> | <{{{tag}}}> }} }}{{#invoke:LuaCall | call | mw.text.nowiki |\{{{1|}}}<!-- -->}}{{#if: {{{tag|}}} | </{{{tag}}}> }}<noinclude> {{Documentation}} </noinclude> 2712eeff2099493a4151603b9ed4ea74e51fa6ed Module:Bold list 828 229 570 569 2024-02-08T00:31:01Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Bold_list]] Scribunto text/plain -- Written by User:Ahecht in response to a thread at [[WP:VPI]] return { main = function(frame) args = {} for i, v in ipairs(frame:getParent().args) do table.insert(args, v) end conj = "'''" .. (#args > 2 and ", " or " ") .. (frame.args.conj or "or") .. " '''" return "'''"..mw.text.listToText(args, "''', '''", conj).."'''" end } 48d1ae74e90832a1b3366b51745334f53a668249 Module:LuaCall 828 230 572 571 2024-02-08T00:31:01Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:LuaCall]] Scribunto text/plain local p={} function p.main(frame) local parent = frame.getParent(frame) or {} local reserved_value = {} local reserved_function, reserved_contents for k, v in pairs(parent.args or {}) do _G[k] = tonumber(v) or v -- transfer every parameter directly to the global variable table end for k, v in pairs(frame.args or {}) do _G[k] = tonumber(v) or v -- transfer every parameter directly to the global variable table end --- Alas Scribunto does NOT implement coroutines, according to --- http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format --- this will not stop us from trying to implement one single lousy function call if _G[1] then reserved_function, reserved_contents = mw.ustring.match(_G[1], "^%s*(%a[^%s%(]*)%(([^%)]*)%)%s*$") end if reserved_contents then local reserved_counter = 0 repeat reserved_counter = reserved_counter + 1 reserved_value[reserved_counter] = _G[mw.ustring.match(reserved_contents, "([^%,]+)")] reserved_contents = mw.ustring.match(reserved_contents, "[^%,]+,(.*)$") until not reserved_contents end local reserved_arraypart = _G while mw.ustring.match(reserved_function, "%.") do reserved_functionpart, reserved_function = mw.ustring.match(reserved_function, "^(%a[^%.]*)%.(.*)$") reserved_arraypart = reserved_arraypart[reserved_functionpart] end local reserved_call = reserved_arraypart[reserved_function] if type(reserved_call) ~= "function" then return tostring(reserved_call) else reserved_output = {reserved_call(unpack(reserved_value))} return reserved_output[reserved_return or 1] end end local function tonumberOrString(v) return tonumber(v) or v:gsub("^\\", "", 1) end local function callWithTonumberOrStringOnPairs(f, ...) local args = {} for _, v in ... do table.insert(args, tonumberOrString(v)) end return (f(unpack(args))) end --[[ ------------------------------------------------------------------------------------ -- ipairsAtOffset -- This is an iterator for arrays. It can be used like ipairs, but with -- specified i as first index to iterate. i is an offset from 1 -- ------------------------------------------------------------------------------------ --]] local function ipairsAtOffset(t, i) local f, s, i0 = ipairs(t) return f, s, i0+i end local function get(s) local G = _G; for _ in mw.text.gsplit( mw.text.trim(s, '%s'), '%s*%.%s*' ) do G = G[_] end return G end --[[ ------------------------------------------------------------------------------------ -- call -- -- This function is usually useful for debugging template parameters. -- Prefix parameter with backslash (\) to force interpreting parameter as string. -- The leading backslash will be removed before passed to Lua function. -- -- Example: -- {{#invoke:LuaCall|call|mw.log|a|1|2|3}} will return results of mw.log('a', 1, 2, 3) -- {{#invoke:LuaCall|call|mw.logObject|\a|321|\321| \321 }} will return results of mw.logObject('a', 321, '321', ' \\321 ') -- -- This example show the debugging to see which Unicode characters are allowed in template parameters, -- {{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0061}}}} return 97 -- {{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0000}}}} return 65533 -- {{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0001}}}} return 65533 -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0002}}}}}} return 0xfffd -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x007e}}}}}} return 0x007e -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x007f}}}}}} return 0x007f -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x0080}}}}}} return 0x0080 -- {{#invoke:LuaCall|call|string.format|0x%04x|{{#invoke:LuaCall|call|mw.ustring.codepoint|{{#invoke:LuaCall|call|mw.ustring.char|0x00a0}}}}}} return 0x00a0 -- ------------------------------------------------------------------------------------ --]] function p.call(frame) return callWithTonumberOrStringOnPairs(get(frame.args[1]), ipairsAtOffset(frame.args, 1) ) end --local TableTools = require('Module:TableTools') --[[ ------------------------------------------------------------------------------------ -- get -- -- Example: -- {{#invoke:LuaCall|get| math.pi }} will return value of math.pi -- {{#invoke:LuaCall|get|math|pi}} will return value of math.pi -- {{#invoke:LuaCall|get| math |pi}} will return value of _G[' math '].pi -- {{#invoke:LuaCall|get|_G| math.pi }} will return value of _G[' math.pi '] -- {{#invoke:LuaCall|get|obj.a.5.c}} will return value of obj.a['5'].c -- {{#invoke:LuaCall|get|obj|a|5|c}} will return value of obj.a[5].c -- ------------------------------------------------------------------------------------ --]] function p.get(frame) -- #frame.args always return 0, regardless of number of unnamed -- template parameters, so check manually instead if frame.args[2] == nil then -- not do tonumber() for this args style, -- always treat it as string, -- so 'obj.1' will mean obj['1'] rather obj[1] return get(frame.args[1]) else local G = _G for _, v in ipairs(frame.args) do G = G[tonumberOrString(v)] end return G end end --[[ ------------------------------------------------------------------------------------ -- invoke -- -- This function is used by Template:Invoke -- ------------------------------------------------------------------------------------ --]] function p.invoke(frame) local pframe, usedpargs = frame:getParent(), {} -- get module and function names from parent args if not provided local pfargs = setmetatable({frame.args[1], frame.args[2]}, {__index = table}) if not pfargs[1] then pfargs[1], usedpargs[1] = pframe.args[1], true if not pfargs[2] then pfargs[2], usedpargs[2] = pframe.args[2], true end elseif not pfargs[2] then pfargs[2], usedpargs[1] = pframe.args[1], true end -- repack sequential args for i, v in ipairs(pframe.args) do if not usedpargs[i] then pfargs:insert(v) usedpargs[i] = true end end -- copy other args for k, v in pairs(pframe.args) do if not pfargs[k] and not usedpargs[k] then pfargs[k], usedpargs[k] = v, true end end -- #invoke off parent frame so the new frame has the same parent return pframe:callParserFunction{name = '#invoke', args = pfargs} end return p d6ec342627682bf90e61bbad921fcc6190f2e090 Template:Navbox lists 10 231 574 573 2024-02-08T00:31:02Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Navbox_lists]] wikitext text/x-wiki #REDIRECT [[Template:HTML lists]] {{R from move}} 8b26162bd61fb3a71c7bbf97d6b1aff6ba54020e Module:Format TemplateData/config 828 232 576 575 2024-02-08T00:31:02Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Format_TemplateData/config]] Scribunto text/plain local Serial = "2022-03-20" --[=[ enwiki configuration {{TemplateData}} mw.loadData() ]=] return { catProblem = false, classMultiColumns = "column-multiple", classNoNumTOC = "nonumtoc", classTable = { "wikitable", "templatedata-params" }, cssParams = { ["border"] = "#B3B7FF 1px solid" }, docpageCreate = "%s/doc", docpageDetect = "/doc", helpBoolean = false, helpContent = false, helpDate = false, helpFile = false, helpFormat = false, helpLine = false, helpNumber = false, helpPage = false, helpString = false, helpTemplate = false, helpURL = false, helpUser = false, msgDescMiss = "missing <code>description</code>", permit = { boole = { [true] = { css = { ["color"] = "#050", ["font-weight"] = "bold" }, lead = false, show = "True" }, [false] = { css = { ["color"] = "#610", ["font-weight"] = "bold" }, lead = false, show = "False" } }, css = { tableheadbg = { ["background-color"] = "#B3B7FF" }, bg = { ["bg"] = "none" }, required = { ["border-left"] = "3px solid black" }, suggested = { ["border-left"] = "3px solid #888" }, optional = { ["border-left"] = "3px solid #CCC" }, deprecated = { ["background-color"] = "#FDD", ["border-left"] = "3px dotted red" } } }, tStylesTOCnum = "TOC nonum", tStylesMultiColumns = "column-multiple", serial = Serial } ce8c2e3e08b7c06d862b014b7affdebda341027a Module:Multilingual 828 233 578 577 2024-02-08T00:31:02Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Multilingual]] Scribunto text/plain local Multilingual = { suite = "Multilingual", serial = "2020-12-10", item = 47541920, globals = { ISO15924 = 71584769, WLink = 19363224 } } --[=[ Utilities for multilingual texts and ISO 639 (BCP47) issues etc. * fair() * fallback() * findCode() * fix() * format() * getBase() * getLang() * getName() * i18n() * int() * isLang() * isLangWiki() * isMinusculable() * isRTL() * message() * sitelink() * tabData() * userLang() * userLangCode() * wikibase() * failsafe() loadData: Multilingual/config Multilingual/names ]=] local Failsafe = Multilingual local GlobalMod = Multilingual local GlobalData = Multilingual local User = { sniffer = "showpreview" } Multilingual.globals.Multilingual = Multilingual.item Multilingual.exotic = { simple = true, no = true } Multilingual.prefer = { cs = true, de = true, en = true, es = true, fr = true, it = true, nl = true, pt = true, ru = true, sv = true } local foreignModule = function ( access, advanced, append, alt, alert ) -- Fetch global module -- Precondition: -- access -- string, with name of base module -- advanced -- true, for require(); else mw.loadData() -- append -- string, with subpage part, if any; or false -- alt -- number, of wikidata item of root; or false -- alert -- true, for throwing error on data problem -- Postcondition: -- Returns whatever, probably table -- 2020-01-01 local storage = access local finer = function () if append then storage = string.format( "%s/%s", storage, append ) end end local fun, lucky, r, suited if advanced then fun = require else fun = mw.loadData end GlobalMod.globalModules = GlobalMod.globalModules or { } suited = GlobalMod.globalModules[ access ] if not suited then finer() lucky, r = pcall( fun, "Module:" .. storage ) end if not lucky then if not suited and type( alt ) == "number" and alt > 0 then suited = string.format( "Q%d", alt ) suited = mw.wikibase.getSitelink( suited ) GlobalMod.globalModules[ access ] = suited or true end if type( suited ) == "string" then storage = suited finer() lucky, r = pcall( fun, storage ) end if not lucky and alert then error( "Missing or invalid page: " .. storage ) end end return r end -- foreignModule() local fetchData = function ( access ) -- Retrieve translated keyword from commons:Data:****.tab -- Precondition: -- access -- string, with page identification on Commons -- Returns table, with data, or string, with error message -- 2019-12-05 local storage = access local r if type( storage ) == "string" then local s storage = mw.text.trim( storage ) s = storage:lower() if s:sub( 1, 2 ) == "c:" then storage = mw.text.trim( storage:sub( 3 ) ) s = storage:lower() elseif s:sub( 1, 8 ) == "commons:" then storage = mw.text.trim( storage:sub( 9 ) ) s = storage:lower() end if s:sub( 1, 5 ) == "data:" then storage = mw.text.trim( storage:sub( 6 ) ) s = storage:lower() end if s == "" or s == ".tab" then storage = false elseif s:sub( -4 ) == ".tab" then storage = storage:sub( 1, -5 ) .. ".tab" else storage = storage .. ".tab" end end if type( storage ) == "string" then local data if type( GlobalData.TabDATA ) ~= "table" then GlobalData.TabDATA = { } end data = GlobalData.TabDATA[ storage ] if data then r = data else local lucky lucky, data = pcall( mw.ext.data.get, storage, "_" ) if type( data ) == "table" then data = data.data if type( data ) == "table" then GlobalData.TabDATA[ storage ] = data else r = string.format( "%s [[%s%s]]", "INVALID Data:*.tab", "commons:Data:", storage ) end else r = "BAD PAGE Data:*.tab &#8211; commons:" .. storage end if r then GlobalData.TabDATA[ storage ] = r data = false else r = data end end else r = "BAD PAGE commons:Data:*.tab" end return r end -- fetchData() local favorites = function () -- Provide fallback codes -- Postcondition: -- Returns table with sequence of preferred languages -- * ahead elements -- * user (not yet accessible) -- * page content language (not yet accessible) -- * page name subpage -- * project -- * en local r = Multilingual.polyglott if not r then local self = mw.language.getContentLanguage():getCode():lower() local sub = mw.title.getCurrentTitle().subpageText local f = function ( add ) local s = add for i = 1, #r do if r[ i ] == s then s = false break -- for i end end -- for i if s then table.insert( r, s ) end end r = { } if sub:find( "/", 2, true ) then sub = sub:match( "/(%l%l%l?)$" ) if sub then table.insert( r, sub ) end elseif sub:find( "^%l%l%l?%-?%a?%a?%a?%a?$" ) and mw.language.isSupportedLanguage( sub ) then table.insert( r, sub ) end f( self ) f( "en" ) Multilingual.polyglott = r end return r end -- favorites() local feasible = function ( ask, accept ) -- Is ask to be supported by application? -- Precondition: -- ask -- lowercase code -- accept -- sequence table, with offered lowercase codes -- Postcondition: -- nil, or true local r for i = 1, #accept do if accept[ i ] == ask then r = true break -- for i end end -- for i return r end -- feasible() local fetch = function ( access, append ) -- Attach config or library module -- Precondition: -- access -- module title -- append -- string, with subpage part of this; or false -- Postcondition: -- Returns: table, with library, or false local got, sign if append then sign = string.format( "%s/%s", access, append ) else sign = access end if type( Multilingual.ext ) ~= "table" then Multilingual.ext = { } end got = Multilingual.ext[ sign ] if not got and got ~= false then local global = Multilingual.globals[ access ] local lib = ( not append or append == "config" ) got = foreignModule( access, lib, append, global ) if type( got ) == "table" then if lib then local startup = got[ access ] if type( startup ) == "function" then got = startup() end end else got = false end Multilingual.ext[ sign ] = got end return got end -- fetch() local fetchISO639 = function ( access ) -- Retrieve table from commons:Data:ISO639/***.tab -- Precondition: -- access -- string, with subpage identification -- Postcondition: -- Returns table, with data, even empty local r if type( Multilingual.iso639 ) ~= "table" then Multilingual.iso639 = { } end r = Multilingual.iso639[ access ] if type( r ) == "nil" then local raw = fetchData( "ISO639/" .. access ) if type( raw ) == "table" then local t r = { } for i = 1, #raw do t = raw[ i ] if type( t ) == "table" and type( t[ 1 ] ) == "string" and type( t[ 2 ] ) == "string" then r[ t[ 1 ] ] = t[ 2 ] else break -- for i end end -- for i else r = false end Multilingual.iso639[ access ] = r end return r or { } end -- fetchISO639() local fill = function ( access, alien, frame ) -- Expand language name template -- Precondition: -- access -- string, with language code -- alien -- language code for which to be generated -- frame -- frame, if available -- Postcondition: -- Returns string local template = Multilingual.tmplLang local r if type( template ) ~= "table" then local cnf = fetch( "Multilingual", "config" ) if cnf then template = cnf.tmplLang end end if type( template ) == "table" then local source = template.title local f, lucky, s Multilingual.tmplLang = template if type( source ) ~= "string" and type( template.namePat ) == "string" and template.namePat:find( "%s", 1, true ) then source = string.format( template.namePat, access ) end if type( source ) == "string" then if not Multilingual.frame then if frame then Multilingual.frame = frame else Multilingual.frame = mw.getCurrentFrame() end end f = function ( a ) return Multilingual.frame:expandTemplate{ title = a } end lucky, s = pcall( f, source ) if lucky then r = s end end end return r end -- fill() local find = function ( ask, alien ) -- Derive language code from name -- Precondition: -- ask -- language name, downcased -- alien -- language code of ask -- Postcondition: -- nil, or string local codes = mw.language.fetchLanguageNames( alien, "all" ) local r for k, v in pairs( codes ) do if mw.ustring.lower( v ) == ask then r = k break -- for k, v end end -- for k, v if not r then r = Multilingual.fair( ask ) end return r end -- find() local fold = function ( frame ) -- Merge template and #invoke arglist -- Precondition: -- frame -- template frame -- Postcondition: -- table, with combined arglist local r = { } local f = function ( apply ) if type( apply ) == "table" and type( apply.args ) == "table" then for k, v in pairs( apply.args ) do v = mw.text.trim( v ) if v ~= "" then r[ tostring( k ) ] = v end end -- for k, v end end -- f() f( frame:getParent() ) f( frame ) return r end -- fold() User.favorize = function ( accept, frame ) -- Guess user language -- Precondition: -- accept -- sequence table, with offered ISO 639 etc. codes -- frame -- frame, if available -- Postcondition: -- Returns string with best code, or nil if not ( User.self or User.langs ) then if not User.trials then User.tell = mw.message.new( User.sniffer ) if User.tell:exists() then User.trials = { } if not Multilingual.frame then if frame then Multilingual.frame = frame else Multilingual.frame = mw.getCurrentFrame() end end User.sin = Multilingual.frame:callParserFunction( "int", User.sniffer ) else User.langs = true end end if User.sin then local order = { } local post = { } local three = { } local unfold = { } local s, sin for i = 1, #accept do s = accept[ i ] if not User.trials[ s ] then if #s > 2 then if s:find( "-", 3, true ) then table.insert( unfold, s ) else table.insert( three, s ) end else if Multilingual.prefer[ s ] then table.insert( order, s ) else table.insert( post, s ) end end end end -- for i for i = 1, #post do table.insert( order, post[ i ] ) end -- for i for i = 1, #three do table.insert( order, three[ i ] ) end -- for i for i = 1, #unfold do table.insert( order, unfold[ i ] ) end -- for i for i = 1, #order do s = order[ i ] sin = User.tell:inLanguage( s ):plain() if sin == User.sin then User.self = s break -- for i else User.trials[ s ] = true end end -- for i end end return User.self end -- User.favorize() Multilingual.fair = function ( ask ) -- Format language specification according to RFC 5646 etc. -- Precondition: -- ask -- string or table, as created by .getLang() -- Postcondition: -- Returns string, or false local s = type( ask ) local q, r if s == "table" then q = ask elseif s == "string" then q = Multilingual.getLang( ask ) end if q and q.legal and mw.language.isKnownLanguageTag( q.base ) then r = q.base if q.n > 1 then local order = { "extlang", "script", "region", "other", "extension" } for i = 1, #order do s = q[ order[ i ] ] if s then r = string.format( "%s-%s", r, s ) end end -- for i end end return r or false end -- Multilingual.fair() Multilingual.fallback = function ( able, another ) -- Is another language suitable as replacement? -- Precondition: -- able -- language version specifier to be supported -- another -- language specifier of a possible replacement, -- or not to retrieve a fallback table -- Postcondition: -- Returns boolean, or table with fallback codes local r if type( able ) == "string" and #able > 0 then if type( another ) == "string" and #another > 0 then if able == another then r = true else local s = Multilingual.getBase( able ) if s == another then r = true else local others = mw.language.getFallbacksFor( s ) r = feasible( another, others ) end end else local s = Multilingual.getBase( able ) if s then r = mw.language.getFallbacksFor( s ) if r[ 1 ] == "en" then local d = fetchISO639( "fallback" ) if type( d ) == "table" and type( d[ s ] ) == "string" then r = mw.text.split( d[ s ], "|" ) table.insert( r, "en" ) end end end end end return r or false end -- Multilingual.fallback() Multilingual.findCode = function ( ask ) -- Retrieve code of local (current project or English) language name -- Precondition: -- ask -- string, with presumable language name -- A code itself will be identified, too. -- Postcondition: -- Returns string, or false local seek = mw.text.trim( ask ) local r = false if #seek > 1 then if seek:find( "[", 1, true ) then local wlink = fetch( "WLink" ) if wlink and type( wlink.getPlain ) == "function" then seek = wlink.getPlain( seek ) end end seek = mw.ustring.lower( seek ) if Multilingual.isLang( seek ) then r = Multilingual.fair( seek ) else local collection = favorites() for i = 1, #collection do r = find( seek, collection[ i ] ) if r then break -- for i end end -- for i end end return r end -- Multilingual.findCode() Multilingual.fix = function ( attempt ) -- Fix frequently mistaken language code -- Precondition: -- attempt -- string, with presumable language code -- Postcondition: -- Returns string with correction, or false if no problem known local r = fetchISO639( "correction" )[ attempt:lower() ] return r or false end -- Multilingual.fix() Multilingual.format = function ( apply, alien, alter, active, alert, frame, assembly, adjacent, ahead ) -- Format one or more languages -- Precondition: -- apply -- string with language list or item -- alien -- language of the answer -- -- nil, false, "*": native -- -- "!": current project -- -- "#": code, downcased, space separated -- -- "-": code, mixcase, space separated -- -- any valid code -- alter -- capitalize, if "c"; downcase all, if "d" -- capitalize first item only, if "f" -- downcase every first word only, if "m" -- active -- link items, if true -- alert -- string with category title in case of error -- frame -- if available -- assembly -- string with split pattern, if list expected -- adjacent -- string with list separator, else assembly -- ahead -- string to prepend first element, if any -- Postcondition: -- Returns string, or false if apply empty local r = false if apply then local slang if assembly then local bucket = mw.text.split( apply, assembly ) local shift = alter local separator if adjacent then separator = adjacent elseif alien == "#" or alien == "-" then separator = " " else separator = assembly end for k, v in pairs( bucket ) do slang = Multilingual.format( v, alien, shift, active, alert ) if slang then if r then r = string.format( "%s%s%s", r, separator, slang ) else r = slang if shift == "f" then shift = "d" end end end end -- for k, v if r and ahead then r = ahead .. r end else local single = mw.text.trim( apply ) if single == "" then r = false else local lapsus, slot slang = Multilingual.findCode( single ) if slang then if alien == "-" then r = slang elseif alien == "#" then r = slang:lower() else r = Multilingual.getName( slang, alien ) if active then slot = fill( slang, false, frame ) if slot then local wlink = fetch( "WLink" ) if wlink and type( wlink.getTarget ) == "function" then slot = wlink.getTarget( slot ) end else lapsus = alert end end end else r = single if active then local title = mw.title.makeTitle( 0, single ) if title.exists then slot = single end end lapsus = alert end if not r then r = single elseif alter == "c" or alter == "f" then r = mw.ustring.upper( mw.ustring.sub( r, 1, 1 ) ) .. mw.ustring.sub( r, 2 ) elseif alter == "d" then if Multilingual.isMinusculable( slang, r ) then r = mw.ustring.lower( r ) end elseif alter == "m" then if Multilingual.isMinusculable( slang, r ) then r = mw.ustring.lower( mw.ustring.sub( r, 1, 1 ) ) .. mw.ustring.sub( r, 2 ) end end if slot then if r == slot then r = string.format( "[[%s]]", r ) else r = string.format( "[[%s|%s]]", slot, r ) end end if lapsus and alert then r = string.format( "%s[[Category:%s]]", r, alert ) end end end end return r end -- Multilingual.format() Multilingual.getBase = function ( ask ) -- Retrieve base language from possibly combined ISO language code -- Precondition: -- ask -- language code -- Postcondition: -- Returns string, or false local r if ask then local slang = ask:match( "^%s*(%a%a%a?)-?%a*%s*$" ) if slang then r = slang:lower() else r = false end else r = false end return r end -- Multilingual.getBase() Multilingual.getLang = function ( ask ) -- Retrieve components of a RFC 5646 language code -- Precondition: -- ask -- language code with subtags -- Postcondition: -- Returns table with formatted subtags -- .base -- .region -- .script -- .suggest -- .year -- .extension -- .other -- .n local tags = mw.text.split( ask, "-" ) local s = tags[ 1 ] local r if s:match( "^%a%a%a?$" ) then r = { base = s:lower(), legal = true, n = #tags } for i = 2, r.n do s = tags[ i ] if #s == 2 then if r.region or not s:match( "%a%a" ) then r.legal = false else r.region = s:upper() end elseif #s == 4 then if s:match( "%a%a%a%a" ) then r.legal = ( not r.script ) r.script = s:sub( 1, 1 ):upper() .. s:sub( 2 ):lower() elseif s:match( "20%d%d" ) or s:match( "1%d%d%d" ) then r.legal = ( not r.year ) r.year = s else r.legal = false end elseif #s == 3 then if r.extlang or not s:match( "%a%a%a" ) then r.legal = false else r.extlang = s:lower() end elseif #s == 1 then s = s:lower() if s:match( "[tux]" ) then r.extension = s for k = i + 1, r.n do s = tags[ k ] if s:match( "^%w+$" ) then r.extension = string.format( "%s-%s", r.extension, s ) else r.legal = false end end -- for k else r.legal = false end break -- for i else r.legal = ( not r.other ) and s:match( "%a%a%a" ) r.other = s:lower() end if not r.legal then break -- for i end end -- for i if r.legal then r.suggest = Multilingual.fix( r.base ) if r.suggest then r.legal = false end end else r = { legal = false } end if not r.legal then local cnf = fetch( "Multilingual", "config" ) if cnf and type( cnf.scream ) == "string" then r.scream = cnf.scream end end return r end -- Multilingual.getLang() Multilingual.getName = function ( ask, alien ) -- Which name is assigned to this language code? -- Precondition: -- ask -- language code -- alien -- language of the answer -- -- nil, false, "*": native -- -- "!": current project -- -- any valid code -- Postcondition: -- Returns string, or false local r if ask then local slang = alien local tLang if slang then if slang == "*" then slang = Multilingual.fair( ask ) elseif slang == "!" then slang = favorites()[ 1 ] else slang = Multilingual.fair( slang ) end else slang = Multilingual.fair( ask ) end if not slang then slang = ask or "?????" end slang = slang:lower() tLang = fetch( "Multilingual", "names" ) if tLang then tLang = tLang[ slang ] if tLang then r = tLang[ ask ] end end if not r then if not Multilingual.ext.tMW then Multilingual.ext.tMW = { } end tLang = Multilingual.ext.tMW[ slang ] if tLang == nil then tLang = mw.language.fetchLanguageNames( slang ) if tLang then Multilingual.ext.tMW[ slang ] = tLang else Multilingual.ext.tMW[ slang ] = false end end if tLang then r = tLang[ ask ] end end if not r then r = mw.language.fetchLanguageName( ask:lower(), slang ) if r == "" then r = false end end else r = false end return r end -- Multilingual.getName() Multilingual.i18n = function ( available, alt, frame ) -- Select translatable message -- Precondition: -- available -- table, with mapping language code ./. text -- alt -- string|nil|false, with fallback text -- frame -- frame, if available -- Returns -- 1. string|nil|false, with selected message -- 2. string|nil|false, with language code local r1, r2 if type( available ) == "table" then local codes = { } local trsl = { } local slang for k, v in pairs( available ) do if type( k ) == "string" and type( v ) == "string" then slang = mw.text.trim( k:lower() ) table.insert( codes, slang ) trsl[ slang ] = v end end -- for k, v slang = Multilingual.userLang( codes, frame ) if slang and trsl[ slang ] then r1 = mw.text.trim( trsl[ slang ] ) if r1 == "" then r1 = false else r2 = slang end end end if not r1 and type( alt ) == "string" then r1 = mw.text.trim( alt ) if r1 == "" then r1 = false end end return r1, r2 end -- Multilingual.i18n() Multilingual.int = function ( access, alien, apply ) -- Translated system message -- Precondition: -- access -- message ID -- alien -- language code -- apply -- nil, or sequence table with parameters $1, $2, ... -- Postcondition: -- Returns string, or false local o = mw.message.new( access ) local r if o:exists() then if type( alien ) == "string" then o:inLanguage( alien:lower() ) end if type( apply ) == "table" then o:params( apply ) end r = o:plain() end return r or false end -- Multilingual.int() Multilingual.isLang = function ( ask, additional ) -- Could this be an ISO language code? -- Precondition: -- ask -- language code -- additional -- true, if Wiki codes like "simple" permitted -- Postcondition: -- Returns boolean local r, s if additional then s = ask else s = Multilingual.getBase( ask ) end if s then r = mw.language.isKnownLanguageTag( s ) if r then r = not Multilingual.fix( s ) elseif additional then r = Multilingual.exotic[ s ] or false end else r = false end return r end -- Multilingual.isLang() Multilingual.isLangWiki = function ( ask ) -- Could this be a Wiki language version? -- Precondition: -- ask -- language version specifier -- Postcondition: -- Returns boolean local r local s = Multilingual.getBase( ask ) if s then r = mw.language.isSupportedLanguage( s ) or Multilingual.exotic[ ask ] else r = false end return r end -- Multilingual.isLangWiki() Multilingual.isMinusculable = function ( ask, assigned ) -- Could this language name become downcased? -- Precondition: -- ask -- language code, or nil -- assigned -- language name, or nil -- Postcondition: -- Returns boolean local r = true if ask then local cnf = fetch( "Multilingual", "config" ) if cnf then local s = string.format( " %s ", ask:lower() ) if type( cnf.stopMinusculization ) == "string" and cnf.stopMinusculization:find( s, 1, true ) then r = false end if r and assigned and type( cnf.seekMinusculization ) == "string" and cnf.seekMinusculization:find( s, 1, true ) and type( cnf.scanMinusculization ) == "string" then local scan = assigned:gsub( "[%(%)]", " " ) .. " " if not scan:find( cnf.scanMinusculization ) then r = false end end end end return r end -- Multilingual.isMinusculable() Multilingual.isRTL = function ( ask ) -- Check whether language is written right-to-left -- Precondition: -- ask -- string, with language (or script) code -- Returns true, if right-to-left local r Multilingual.rtl = Multilingual.rtl or { } r = Multilingual.rtl[ ask ] if type( r ) ~= "boolean" then local bib = fetch( "ISO15924" ) if type( bib ) == "table" and type( bib.isRTL ) == "function" then r = bib.isRTL( ask ) else r = mw.language.new( ask ):isRTL() end Multilingual.rtl[ ask ] = r end return r end -- Multilingual.isRTL() Multilingual.message = function ( arglist, frame ) -- Show text in best match of user language like system message -- Precondition: -- arglist -- template arguments -- frame -- frame, if available -- Postcondition: -- Returns string with appropriate text local r if type( arglist ) == "table" then local t = { } local m, p, save for k, v in pairs( arglist ) do if type( k ) == "string" and type( v ) == "string" then v = mw.text.trim( v ) if v ~= "" then if k:match( "^%l%l" ) then t[ k ] = v elseif k:match( "^%$%d$" ) and k ~= "$0" then p = p or { } k = tonumber( k:match( "^%$(%d)$" ) ) p[ k ] = v if not m or k > m then m = k end end end end end -- for k, v if type( arglist[ "-" ] ) == "string" then save = arglist[ arglist[ "-" ] ] end r = Multilingual.i18n( t, save, frame ) if p and r and r:find( "$", 1, true ) then t = { } for i = 1, m do t[ i ] = p[ i ] or "" end -- for i r = mw.message.newRawMessage( r, t ):plain() end end return r or "" end -- Multilingual.message() Multilingual.sitelink = function ( all, frame ) -- Make link at local or other site with optimal linktext translation -- Precondition: -- all -- string or table or number, item ID or entity -- frame -- frame, if available -- Postcondition: -- Returns string with any helpful internal link, or plain text local s = type( all ) local object, r if s == "table" then object = all elseif s == "string" then object = mw.wikibase.getEntity( all ) elseif s == "number" then object = mw.wikibase.getEntity( string.format( "Q%d", all ) ) end if type( object ) == "table" then local collection = object.sitelinks local entry s = false if type( collection ) == "table" then Multilingual.site = Multilingual.site or mw.wikibase.getGlobalSiteId() entry = collection[ Multilingual.site ] if entry then s = ":" .. entry.title elseif collection.enwiki then s = "w:en:" .. collection.enwiki.title end end r = Multilingual.wikibase( object, "labels", frame ) if s then if s == ":" .. r then r = string.format( "[[%s]]", s ) else r = string.format( "[[%s|%s]]", s, r ) end end end return r or "" end -- Multilingual.sitelink() Multilingual.tabData = function ( access, at, alt, frame ) -- Retrieve translated keyword from commons:Data:****.tab -- Precondition: -- access -- string, with page identification on Commons -- at -- string, with keyword -- alt -- string|nil|false, with fallback text -- frame -- frame, if available -- Returns -- 1. string|nil|false, with selected message -- 2. language code, or "error" local data = fetchData( access ) local r1, r2 if type( data ) == "table" then if type( at ) == "string" then local seek = mw.text.trim( at ) if seek == "" then r1 = "EMPTY Multilingual.tabData key" else local e, poly for i = 1, #data do e = data[ i ] if type( e ) == "table" then if e[ 1 ] == seek then if type( e[ 2 ] ) == "table" then poly = e[ 2 ] else r1 = "INVALID Multilingual.tabData bad #" .. tostring( i ) end break -- for i end else break -- for i end end -- for i if poly then data = poly else r1 = "UNKNOWN Multilingual.tabData key: " .. seek end end else r1 = "INVALID Multilingual.tabData key" end else r1 = data end if r1 then r2 = "error" elseif data then r1, r2 = Multilingual.i18n( data, alt, frame ) r2 = r2 or "error" end return r1, r2 end -- Multilingual.tabData() Multilingual.userLang = function ( accept, frame ) -- Try to support user language by application -- Precondition: -- accept -- string or table -- space separated list of available ISO 639 codes -- Default: project language, or English -- frame -- frame, if available -- Postcondition: -- Returns string with appropriate code local s = type( accept ) local codes, r, slang if s == "string" then codes = mw.text.split( accept:lower(), "%s+" ) elseif s == "table" then codes = { } for i = 1, #accept do s = accept[ i ] if type( s ) == "string" and s ~= "" then table.insert( codes, s:lower() ) end end -- for i end slang = User.favorize( codes, frame ) if slang then if feasible( slang, codes ) then r = slang elseif slang:find( "-", 1, true ) then slang = Multilingual.getBase( slang ) if feasible( slang, codes ) then r = slang end end if not r then local others = mw.language.getFallbacksFor( slang ) for i = 1, #others do slang = others[ i ] if feasible( slang, codes ) then r = slang break -- for i end end -- for i end end if not r then local back = favorites() for i = 1, #back do slang = back[ i ] if feasible( slang, codes ) then r = slang break -- for i end end -- for i if not r and codes[ 1 ] then r = codes[ 1 ] end end return r or favorites()[ 1 ] end -- Multilingual.userLang() Multilingual.userLangCode = function () -- Guess a user language code -- Postcondition: -- Returns code of current best guess return User.self or favorites()[ 1 ] end -- Multilingual.userLangCode() Multilingual.wikibase = function ( all, about, attempt, frame ) -- Optimal translation of wikibase component -- Precondition: -- all -- string or table, object ID or entity -- about -- boolean, true "descriptions" or false "labels" -- attempt -- string or not, code of preferred language -- frame -- frame, if available -- Postcondition: -- Returns -- 1. string, with selected message -- 2. string, with language code, or not local s = type( all ) local object, r, r2 if s == "table" then object = all elseif s == "string" then object = mw.wikibase.getEntity( all ) end if type( object ) == "table" then if about and about ~= "labels" then s = "descriptions" else s = "labels" end object = object[ s ] if type( object ) == "table" then if object[ attempt ] then r = object[ attempt ].value r2 = attempt else local poly for k, v in pairs( object ) do poly = poly or { } poly[ k ] = v.value end -- for k, v if poly then r, r2 = Multilingual.i18n( poly, nil, frame ) end end end end return r or "", r2 end -- Multilingual.wikibase() Failsafe.failsafe = function ( atleast ) -- Retrieve versioning and check for compliance -- Precondition: -- atleast -- string, with required version -- or wikidata|item|~|@ or false -- Postcondition: -- Returns string -- with queried version/item, also if problem -- false -- if appropriate -- 2020-08-17 local since = atleast local last = ( since == "~" ) local linked = ( since == "@" ) local link = ( since == "item" ) local r if last or link or linked or since == "wikidata" then local item = Failsafe.item since = false if type( item ) == "number" and item > 0 then local suited = string.format( "Q%d", item ) if link then r = suited else local entity = mw.wikibase.getEntity( suited ) if type( entity ) == "table" then local seek = Failsafe.serialProperty or "P348" local vsn = entity:formatPropertyValues( seek ) if type( vsn ) == "table" and type( vsn.value ) == "string" and vsn.value ~= "" then if last and vsn.value == Failsafe.serial then r = false elseif linked then if mw.title.getCurrentTitle().prefixedText == mw.wikibase.getSitelink( suited ) then r = false else r = suited end else r = vsn.value end end end end end end if type( r ) == "nil" then if not since or since <= Failsafe.serial then r = Failsafe.serial else r = false end end return r end -- Failsafe.failsafe() -- Export local p = { } p.fair = function ( frame ) -- Format language code -- 1 -- language code local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.fair( s ) or "" end -- p.fair p.fallback = function ( frame ) -- Is another language suitable as replacement? -- 1 -- language version specifier to be supported -- 2 -- language specifier of a possible replacement local s1 = mw.text.trim( frame.args[ 1 ] or "" ) local s2 = mw.text.trim( frame.args[ 2 ] or "" ) local r = Multilingual.fallback( s1, s2 ) if type( r ) == "table" then r = r[ 1 ] else r = r and "1" or "" end return r end -- p.fallback p.findCode = function ( frame ) -- Retrieve language code from language name -- 1 -- name in current project language local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.findCode( s ) or "" end -- p.findCode p.fix = function ( frame ) local r = frame.args[ 1 ] if r then r = Multilingual.fix( mw.text.trim( r ) ) end return r or "" end -- p.fix p.format = function ( frame ) -- Format one or more languages -- 1 -- language list or item -- slang -- language of the answer, if not native -- * -- native -- ! -- current project -- any valid code -- shift -- capitalize, if "c"; downcase, if "d" -- capitalize first item only, if "f" -- link -- 1 -- link items -- scream -- category title in case of error -- split -- split pattern, if list expected -- separator -- list separator, else split -- start -- prepend first element, if any local r local link if frame.args.link == "1" then link = true end r = Multilingual.format( frame.args[ 1 ], frame.args.slang, frame.args.shift, link, frame.args.scream, frame, frame.args.split, frame.args.separator, frame.args.start ) return r or "" end -- p.format p.getBase = function ( frame ) -- Retrieve base language from possibly combined ISO language code -- 1 -- code local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.getBase( s ) or "" end -- p.getBase p.getName = function ( frame ) -- Retrieve language name from ISO language code -- 1 -- code -- 2 -- language to be used for the answer, if not native -- ! -- current project -- * -- native -- any valid code local s = mw.text.trim( frame.args[ 1 ] or "" ) local slang = frame.args[ 2 ] local r Multilingual.frame = frame if slang then slang = mw.text.trim( slang ) end r = Multilingual.getName( s, slang ) return r or "" end -- p.getName p.int = function ( frame ) -- Translated system message -- 1 -- message ID -- lang -- language code -- $1, $2, ... -- parameters local sysMsg = frame.args[ 1 ] local r if sysMsg then sysMsg = mw.text.trim( sysMsg ) if sysMsg ~= "" then local n = 0 local slang = frame.args.lang local i, params, s if slang == "" then slang = false end for k, v in pairs( frame.args ) do if type( k ) == "string" then s = k:match( "^%$(%d+)$" ) if s then i = tonumber( s ) if i > n then n = i end end end end -- for k, v if n > 0 then local s params = { } for i = 1, n do s = frame.args[ "$" .. tostring( i ) ] or "" table.insert( params, s ) end -- for i end r = Multilingual.int( sysMsg, slang, params ) end end return r or "" end -- p.int p.isLang = function ( frame ) -- Could this be an ISO language code? -- 1 -- code local s = mw.text.trim( frame.args[ 1 ] or "" ) local lucky, r = pcall( Multilingual.isLang, s ) return r and "1" or "" end -- p.isLang p.isLangWiki = function ( frame ) -- Could this be a Wiki language version? -- 1 -- code -- Returns non-empty, if possibly language version local s = mw.text.trim( frame.args[ 1 ] or "" ) local lucky, r = pcall( Multilingual.isLangWiki, s ) return r and "1" or "" end -- p.isLangWiki p.isRTL = function ( frame ) -- Check whether language is written right-to-left -- 1 -- string, with language code -- Returns non-empty, if right-to-left local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.isRTL( s ) and "1" or "" end -- p.isRTL() p.message = function ( frame ) -- Translation of text element return Multilingual.message( fold( frame ), frame ) end -- p.message p.sitelink = function ( frame ) -- Make link at local or other site with optimal linktext translation -- 1 -- item ID local s = mw.text.trim( frame.args[ 1 ] or "" ) local r if s:match( "^%d+$") then r = tonumber( s ) elseif s:match( "^Q%d+$") then r = s end if r then r = Multilingual.sitelink( r, frame ) end return r or s end -- p.sitelink p.tabData = function ( frame ) -- Retrieve best message text from Commons Data -- 1 -- page identification on Commons -- 2 -- keyword -- alt -- fallback text local suite = frame.args[ 1 ] local seek = frame.args[ 2 ] local salt = frame.args.alt local r = Multilingual.tabData( suite, seek, salt, frame ) return r end -- p.tabData p.userLang = function ( frame ) -- Which language does the current user prefer? -- 1 -- space separated list of available ISO 639 codes local s = mw.text.trim( frame.args[ 1 ] or "" ) return Multilingual.userLang( s, frame ) end -- p.userLang p.wikibase = function ( frame ) -- Optimal translation of wikibase component -- 1 -- object ID -- 2 -- 1 for "descriptions", 0 for "labels". -- or either "descriptions" or "labels" local r local s = mw.text.trim( frame.args[ 1 ] or "" ) if s ~= "" then local s2 = mw.text.trim( frame.args[ 2 ] or "0" ) local slang = mw.text.trim( frame.args.lang or "" ) local large = ( s2 ~= "" and s2 ~= "0" ) if slang == "" then slang = false end r = Multilingual.wikibase( s, large, slang, frame ) end return r or "" end -- p.wikibase p.failsafe = function ( frame ) -- Versioning interface local s = type( frame ) local since if s == "table" then since = frame.args[ 1 ] elseif s == "string" then since = frame end if since then since = mw.text.trim( since ) if since == "" then since = false end end return Failsafe.failsafe( since ) or "" end -- p.failsafe() p.Multilingual = function () return Multilingual end -- p.Multilingual return p 6fc38809302c05872fef2c1602e2d4a3be5143ec Template:Plainlist/doc 10 234 580 579 2024-02-08T00:31:04Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Plainlist/doc]] wikitext text/x-wiki {{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --> {{Cascade-protected template}} {{High-use}} {{Template shortcut|PL}} {{Uses TemplateStyles|Template:Plainlist/styles.css}} This template provides a [[Web Content Accessibility Guidelines|WCAG]]/ISO-standards-compliant accessible alternative to <code><nowiki><br /></nowiki></code> separated lists, per [[WP:UBLIST]] and [[WP:PLIST]] == Usage == {{tl|plainlist}} starts a plain (i.e. unbulleted) list, such as: {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with {{tag|br|s}}. Detailed reasons for using this template can be found at [[WP:UBLIST]]. This template can be used with or without {{tl|endplainlist}}. It is an alternative to {{tl|unbulleted list}}, which performs the same function in a more concise but less wiki-style manner. Note that {{tl|unbulleted list}} will work inside image captions, whereas {{tl|plainlist}} does not. == Examples == {{Markup |<nowiki> {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} </nowiki> | {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} }} === Alternative syntax === {{Markup |<nowiki> {{plainlist}} * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] {{endplainlist}} </nowiki> | {{plainlist}} * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] {{endplainlist}} }} == Parameters == {{Format TemplateData|JSON= { "params": { "1": { "label": "List content", "description": "If supplied, the list, as a normal bulleted list. (Every line should start with an asterisk. No blank lines between lines.) See template page for how this works otherwise.", "type": "content", "suggested": true }, "class": { "label": "CSS classes", "description": "Adds a CSS class to the containing div.", "type": "string", "default": "The class \"plainlist\" is always applied." }, "style": { "label": "Custom CSS", "description": "Adds CSS style options. Complex styles should not be used in articles (per [[WP:Deviations]]) but may be acceptable on user, project, and talk pages.", "type": "string", "example": "border:solid 1px silver; background:lightyellow" }, "indent": { "label": "Indent level", "description": "Indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.", "type": "number", "example": "2" } }, "description": "This template provides a WCAG/ISO-standards-compliant accessible alternative to &lt;br /&gt; separated lists, per [[WP:UBLIST]] and [[WP:PLIST]]. It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with &lt;br /&gt;. Detailed reasons for using this template can be found at WP:UBLIST." } }} === Controlling line-breaking === Template {{tlx|nbsp}} may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists, to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details. == Technical details == {{tl|Plainlist}} works by constructing a [[span and div|div]] with the [[Cascading Style Sheets|CSS]] class "plainlist" which has the styles listed in [[Template:Plainlist/styles.css]]. {| class="wikitable" ! Wikitext ! Expanded template ! HTML |- style="vertical-align:top;" | class="nowrap" | <pre> {{Plainlist| * Example 1 * Example 2 * Example 3 }} </pre> | class="nowrap" | {{nowiki2|tag=pre| {{Plainlist| * Example 1 * Example 2 * Example 3 }} }} | <syntaxhighlight lang="html"> <div class="plainlist"> <ul> <li>Example 1</li> <li>Example 2</li> <li>Example 3</li> </ul> </div> </syntaxhighlight> |} == Redirects == * {{Template link|Bulletless list}} * {{Template link|PL}} * {{Template link|Plain list}} * {{tl|Startplainlist}} == See also == * {{tl|unbulleted list}} – essentially the same but uses <code><nowiki>| ... | ... | ...</nowiki></code> instead of <code><nowiki>|* ... * ... * ...</nowiki></code> * {{tl|flatlist}} and {{tl|hlist}} (replacements for comma- or dash-separated lists) * {{tl|bulleted list}} * {{tl|indented plainlist}} * {{tl|ordered list}} * {{section link|Template:Infobox person#Inline lists}} for more information on creating lists within the Infobox family of templates, with examples in the following {{section link|Template:Infobox person#Examples|nopage=y}} {{navbox lists}} <includeonly>{{Sandbox other|| <!-- CATEGORIES HERE, THANKS --> [[Category:List formatting and function templates|Plainlist]] [[Category:Semantic markup templates]] [[Category:Typing-aid templates|Plainlist]] }}</includeonly> 31a29deecf8ad25736413a712c9818665e2d2a54 Template:Plainlist/styles.css 10 235 582 581 2024-02-08T00:31:04Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Template:Plainlist/styles.css]] sanitized-css text/css /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Module:Shortcut/styles.css 828 236 584 583 2024-02-08T00:31:04Z Otonashi Ayana 2 1 revision imported from [[:wikipedia:Module:Shortcut/styles.css]] sanitized-css text/css /* {{pp-template}} */ .module-shortcutboxplain { float: right; margin: 0 0 0 1em; border: 1px solid #aaa; background: #fff; padding: 0.3em 0.6em 0.2em 0.6em; text-align: center; font-size: 85%; } .module-shortcutboxleft { float: left; margin: 0 1em 0 0; } .module-shortcutlist { display: inline-block; border-bottom: 1px solid #aaa; margin-bottom: 0.2em; } .module-shortcutboxplain ul { font-weight: bold; } .module-shortcutanchordiv { position: relative; top: -3em; } li .module-shortcutanchordiv { float: right; /* IE/Edge in list items */ } .mbox-imageright .module-shortcutboxplain { padding: 0.4em 1em 0.4em 1em; line-height: 1.3; margin: 0; } ccf3877e4b14726147d3b1d8a297fbecacdb2cf8 Template:Infobox item 10 133 585 443 2024-02-08T00:32:08Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Type | data2 = {{{type|}}} | label3 = Traits | data3 = {{#if:{{{traits|}}}|{{plainlist|{{{traits|}}}}}}} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Effect | data5 = {{{effect|}}} | label6 = Damage | data6 = {{{dmg|}}} | label7 = Speed | data7 = {{{speed|}}} | label8 = Hit Chance | data8 = {{{hit|}}} | label9 = Throw Damage | data9 = {{{throw|}}} | label10 = Sell Price | data10 = {{#if:{{{sell|}}}|+{{{sell}}} [[Funds|FND]]}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0 | headerstyle = background:black;text-align:center }} 6b5ed879fe64c42957f833d336e1d72b462a70a1 587 585 2024-02-08T00:34:33Z Otonashi Ayana 2 wikitext text/x-wiki <templatestyles src="Infobox item/styles.css" />{{Infobox | title = {{#if:{{{title|}}}|{{{title|}}}|{{PAGENAME}}}} | image = [[File:{{{image}}}]] | header1 = Item Information | label2 = Type | data2 = {{{type|}}} | label3 = Traits | data3 = {{#if:{{{traits|}}}|{{plainlist|{{{traits|}}}}}}} | label4 = Stat | data4 = {{#switch:{{{stat|}}} | str = [STR] | dex = [DEX] | per = [PER] | knw = [KNW] | chr = [CHR] }} | label5 = Effect | data5 = {{{effect|}}} | label6 = Damage | data6 = {{{dmg|}}} | label7 = Speed | data7 = {{{speed|}}} | label8 = Hit Chance | data8 = {{{hit|}}} | label9 = Throw Damage | data9 = {{{throw|}}} | label10 = Sell Price | data10 = {{#if:{{{sell|}}}|+{{{sell}}} [[Funds|FND]]}} | titleclass = pixel-title | titlestyle = background:black;padding:4px 0 | headerstyle = background:black;text-align:center | labelstyle = vertical-align:top }} dbf7c42f6444de4b11c89173fc616bdc3271c610 Template:Trait 10 168 586 444 2024-02-08T00:33:38Z Otonashi Ayana 2 wikitext text/x-wiki *{{#switch:{{{1}}} | one = [ONE-HANDED] | two = [TWO-HANDED] | sharp = [SHARP] | blunt = [BLUNT] | book = [BOOK] | personal = [PERSONAL] }} 01b9667a51e03d86c27774ed4258d07d60f57186 Scalpel 0 135 588 359 2024-02-08T00:35:36Z Otonashi Ayana 2 wikitext text/x-wiki {{infobox item | image = item_scalpel.svg | traits = {{trait|sharp}}{{trait|one}} | stat = knw | dmg = 4 | speed = 80 | hit = 65 | throw = 1 | sell = 1 }}The '''scalpel''' is the starting weapon of [[Mimi]]. It can also be bought from the [[Pharmacy]] for {{fnd|3}}. 29b8bbc70c81e53edb654b4f5b1cbdaad22077bd